4 ms·
Redux isn't complex. It provides a simple way of doing state management. React-redux is slightly more complex, but only because the docs give the horrible adv
by wry_discontent 7y ago
Redux isn't complex. It provides a simple way of doing state management. React-redux is slightly more complex, but only because the docs give the horrible advice of grouping things by type instead of domain. Using the "ducks" pattern is vastly superior and simplifies a lot. It also hurts, I think, that most people create actions and reducers that are 1:1. Those should be different things.
Hooks, imo, simplified a lot of these issues.
- acemarke 7y agoYep, we're gonna change the tutorials and examples as part of the docs revamp to emphasize "feature folders" and "ducks". It's admittedly hard to come up with examples of actions that _aren't_ a 1:1 mapping in a small tutorial app, but maybe we can figure something out. Related FAQ: https://redux.js.org/faq/actions#is-there-always-a-one-to-one-mapping-between-reducers-and-actions https://redux.js.org/faq/actions#is-there-always-a-one-to-on...