Hacker News new | ask | show | jobs
by imaok 4117 days ago
Can someone explain what problem this solves that just using flux can't? I'm having trouble understanding how a tree structure is useful, because I can imagine different actions affecting different stores in different orders. So I wouldn't want changes to only bubble up, sometimes I would need them in the other direction.
1 comments

I found David Nolen's talk at React conf useful in understanding the motivation for cursors. https://www.youtube.com/watch?v=5hGHdETNteE. See in particular starting around 15:40. Cursors are used when you are strict about global immutable state; whereas Flux (like React itself) is agnostic about this. IMO this agnosticism means you end up with a more complex architecture. David's point in the video is, even with cursors and immutable state atoms, you end up with a parallel set of complications to deal with -- around questions of inter-component communication across nodes of the tree and information hiding. He sketches Om's current solution to this using observable cursors which kind of let you trace data-change dependencies between components - but I have to say without understanding Om better it's a bit hard to follow.