Last active
October 7, 2017 18:51
-
-
Save vzaidman/df1c85c39930e8b3e786500e76b7e8dd to your computer and use it in GitHub Desktop.
Equivalent Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeActionCreator } from 'redux-toolbelt' | |
export const increaseBy = makeActionCreator('INCREASE_BY') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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