Created
October 7, 2017 18:52
-
-
Save vzaidman/49b6d30dbbaa496632ce77e1783dabec to your computer and use it in GitHub Desktop.
test code for danni
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, decreaseBy } from 'actions' | |
export const countReducer = makeReducer( | |
increaseBy, (count, { payload }) => count + payload, | |
decreaseBy, (count, { payload }) => count - payload, | |
{defaultState: 100} | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment