om

Please ask the channel first, not @dnolen directly!
sova-soars-the-sora 2018-05-02T11:15:08.000354Z

Gotta admit, recursive queries got me stumped a bit. Ideally my data is a tree, nested in the way that the recursion would like, and then a General component invokes a sub component that draws the recursion... seems simple enough in concept but I'm having trouble figuring out how to map it to my om.next ui code. If someone who is knowledgable has a minute to check over some code I'd really appreciate it. 😃

sova-soars-the-sora 2018-05-02T21:36:20.000286Z

All righty, after studying the dev cards for a while ... https://github.com/omcljs/om/blob/master/src/devcards/om/devcards/core.cljs#L286

sova-soars-the-sora 2018-05-02T21:37:25.000038Z

I've got a much better grasp of what needs to be in place for recursion to work, namely you need reader functions that will do what you want, and maybe i'll compile an index of all the various om.next reader functions that are littered about ... i'm not fluent enough to write roll my own and having a list would probably help the next person.

sova-soars-the-sora 2018-05-02T21:38:34.000294Z

for my comment tree which has 3 comments and 2 nested comments for a total of 5, I have 5 divs rendering! yay! success... except that I cannot uniquely identify the divs, so they're either all empty divs, or i supply {:keyfn :cid} but then they stop rendering =(

sova-soars-the-sora 2018-05-02T21:40:06.000455Z

@sova uploaded a file: https://clojurians.slack.com/files/U3ES97LAC/FAJ8YCYCE/-.clj

sova-soars-the-sora 2018-05-02T21:41:25.000134Z

Data structure / atom looks like:

sova-soars-the-sora 2018-05-02T21:57:31.000090Z

Seems like that's my only issue, the :keyfn ... but it's hard to tell at casual glance on a recursive thang.

sova-soars-the-sora 2018-05-02T21:57:44.000076Z

@sova uploaded a file: https://clojurians.slack.com/files/U3ES97LAC/FAJDSL03H/-.clj

sova-soars-the-sora 2018-05-02T21:58:49.000362Z

And my two reader methods look like...