4 ms·
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
by CuriousSkeptic 9y ago
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.
- 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.