Fork me on GitHub

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 ui code. If someone who is knowledgable has a minute to check over some code I'd really appreciate it. 😃


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 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.


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 =(


Data structure / atom looks like:


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


And my two reader methods look like...