LaunchPadLab / lp-utils

Our Utilities
MIT License
1 stars 0 forks source link

Create reducer helpers for basic setters #75

Closed dpikt closed 7 years ago

dpikt commented 7 years ago

Instead of

const reducer = handleActions({
  [actions.setUser]: (state, { payload: user }) => set('user', user, state),
}, initialState)

we could write

const reducer = handleActions({
  [actions.setUser]: setState('user'),
}, initialState)

Similarly, a unsetState() helper would be useful.

dpikt commented 7 years ago

Moved to lp-redux-utils