What do you think of the Redux Ducks proposal?
To improve modularity Erik Rasmussen came up with Ducks: Redux Reducer Bundles. You can read the proposal here. A quick view at the rules:
A module...
- MUST
export default
a function calledreducer()
- MUST
export
its action creators as functions- MUST have action types in the form
npm-module-or-app/reducer/ACTION_TYPE
- MAY export its action types as
UPPER_SNAKE_CASE
, if an external reducer needs to listen for them, or if it is a published reusable libraryThese same guidelines are recommended for
{actionType, action, reducer}
bundles that are shared as reusable Redux libraries.
What do you think of Redux Ducks? Would you use them yourself?