Hacker News new | past | comments | ask | show | jobs | submit login

The new plan sounds a lot like Redux.



No, Redux is far more like Om Now. In fact, Om Now was one of the early influencers for the single atom app state idea. The only difference is that, instead of using cursors, Redux uses flux-style actions for mutations. You select data from the app state by digging into the app state manually, exactly like you would in Om Now.

It's a common misconception (I fell for this too) that simply having a single atom app state and colocating state accessors with the component is similar to this architecture. It's really not. The query syntax is an extremely important part here, with transparent server syncing, and support for arbitrary graph representations of the state.


Om's "parser" and query syntax seems to decouple state read/writes from components in the same way that action creators do, with similar benefits. Reading through Om.next didn't change that impression, is there any other resource I should look at?


Action creators do not read anything from the state. They are only for mutations. You read from the state by literally digging into the JS object.

Not sure what else to say, actions and queries are completely different things.


It's pretty different. It's not flux or flux-like. And almost every Redux example or tutorial does use ES6 or more. As far as the platform, I had an easier time learning ClojureScript and Leiningen than Gulp/Webpack/Babel.

Not saying that Redux isn't easier, though. It's very nice.


That's a whole 'nother topic. I'm currently using redux with plain ES5, no compiler or build tools other than a minifier.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: