Skip to content

Instantly share code, notes, and snippets.

@ShMcK
Created February 26, 2018 15:35
Show Gist options
  • Select an option

  • Save ShMcK/6a6d0bc0849849a49324f0e48fa47e5e to your computer and use it in GitHub Desktop.

Select an option

Save ShMcK/6a6d0bc0849849a49324f0e48fa47e5e to your computer and use it in GitHub Desktop.
A simplified reducer
const countReducer = {
INCREMENT: (state, action) => state + action.payload,
DECREMENT: (state, action) => state - action.payload,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment