Skip to content

Instantly share code, notes, and snippets.

@mvbattan
Created December 11, 2017 21:43
Show Gist options
  • Save mvbattan/806400d57fba01206dd991c0844e8f50 to your computer and use it in GitHub Desktop.
Save mvbattan/806400d57fba01206dd991c0844e8f50 to your computer and use it in GitHub Desktop.
Complete Reducer - before
const reducerDescription: {
[actions.GET_MATCHES]: onLoading(),
[actions.GET_MATCHES_SUCCESS]: onSuccess(),
[actions.GET_MATCHES_FAILURE]: onFailure(),
[actions.GET_PITCHES]: onLoading(),
[actions.GET_PITCHES_SUCCESS]: onSuccess(),
[actions.GET_PITCHES_FAILURE]: onFailure(),
[actions.INCREMENT_COUNTER]: onAdd()
};
export default createReducer(initialState, reducerDescription);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment