Skip to content

Instantly share code, notes, and snippets.

@jplemieux66
Created January 31, 2018 13:43
Show Gist options
  • Save jplemieux66/5f8c6f03cc0eaf2473b8920f1b4a4d55 to your computer and use it in GitHub Desktop.
Save jplemieux66/5f8c6f03cc0eaf2473b8920f1b4a4d55 to your computer and use it in GitHub Desktop.
export function reducer(state = initialState, action: Action): State {
switch(action.type) {
case ACTION_TYPE: {
return action.payload
}
default:
return state;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment