Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save factoryhr/04396665d84072b62ff1d498bc84dcde to your computer and use it in GitHub Desktop.
Save factoryhr/04396665d84072b62ff1d498bc84dcde to your computer and use it in GitHub Desktop.
function incrementHandler(state, action) {
var nextState = Object.assign({}, state);
nextState.counter += 1;
return nextState;
}
function decrementHandler(state, action) {
var nextState = Object.assign({}, state);
nextState.counter -= 1;
return nextState;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment