Re:Idiomatic Redux: Implementation and Intent
by hesarenu on Friday July 07, 2017 @06:10AM
(#14717277)
The crazy state tree in redux is what made me go to mobx. I had events firing off updating multiple redux functions. It was very difficult to understand the flow. Mobx has simplified my changes to one place. To me they both the same managing client side state.
[ Parent
| on HN ]
Re:Idiomatic Redux: Implementation and Intent
by CuriousSkeptic on Friday July 07, 2017 @08:48AM
(#14717906)
Mobx vs redux is probably not the right comparison here though. Mobx comes bundled with 'computed' and encourages most state to be handled there.
Redux doesn't have this, instead libs like reselect fills space.
My experience with redux was frustrating in the way you explained, but once I "got" how to defer all state to reselect instead of trying to do things with reducers it got significantly simpler.
Re:Idiomatic Redux: Implementation and Intent
by hesarenu on Friday July 07, 2017 @11:29AM
(#14719116)
My frustration wrt redux was organising the file structure where to place actions reducers. Otherwise it was a joy to work with. I considered it very simple and easy to work until I found mobx.
Re:Idiomatic Redux: Implementation and Intent
by acemarke on Friday July 07, 2017 @12:03PM
(#14719469)
The two typical approaches are "file-type-first" (separate folders for "actions", "reducers", "containers", etc), and "feature-first". I've got articles discussing various React/Redux project structure approaches at https://github.com/markerikson/react-redux-links/blob/master... .