Sign in
Log inSign up

What do you think of the Redux Ducks proposal?

Stephan de Vries's photo
Stephan de Vries
·May 12, 2016

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...

  1. MUST export default a function called reducer()
  2. MUST export its action creators as functions
  3. MUST have action types in the form npm-module-or-app/reducer/ACTION_TYPE
  4. 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 library

These 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?