Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save factoryhr/6959a839579bcb4f576c2fc2c44dec36 to your computer and use it in GitHub Desktop.
Save factoryhr/6959a839579bcb4f576c2fc2c44dec36 to your computer and use it in GitHub Desktop.
function counterReducer(state, action) {
switch (action.type) {
case actionTypes.increment:
return incrementHandler(state, action);
case actionTypes.decrement:
return decrementHandler(state, action);
default:
return state;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment