3 ms·
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 flo
by hesarenu 9y ago
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.
- CuriousSkeptic 9y agoMobx 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.
- hesarenu 9y agoMy 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.
- acemarke 9y agoThe 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/project-structure.md https://github.com/markerikson/react-redux-links/blob/master... .
- hesarenu 9y agoI have done both approaches, ducks, slight variation on ducks all running on production apps. Still not satisfied. I have referred your links. Thank you btw.