Skip to content

Instantly share code, notes, and snippets.

@vzaidman
Created October 7, 2017 18:52
Show Gist options
  • Save vzaidman/49b6d30dbbaa496632ce77e1783dabec to your computer and use it in GitHub Desktop.
Save vzaidman/49b6d30dbbaa496632ce77e1783dabec to your computer and use it in GitHub Desktop.
test code for danni
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