Skip to content

Instantly share code, notes, and snippets.

@vzaidman
Last active October 7, 2017 18:51
Show Gist options
  • Save vzaidman/df1c85c39930e8b3e786500e76b7e8dd to your computer and use it in GitHub Desktop.
Save vzaidman/df1c85c39930e8b3e786500e76b7e8dd to your computer and use it in GitHub Desktop.
Equivalent Code
import { makeActionCreator } from 'redux-toolbelt'
export const increaseBy = makeActionCreator('INCREASE_BY')
import { makeReducer } from 'redux-toolbelt'
import { increaseBy } from 'actions'
export const countReducer = makeReducer(increaseBy,
(state, { payload }) => state + payload,
{defaultState: 100}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment