Skip to content

Instantly share code, notes, and snippets.

@markerikson
Created May 29, 2016 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save markerikson/b1a22137527bf8e0ce6928ffb8e46fe7 to your computer and use it in GitHub Desktop.
Save markerikson/b1a22137527bf8e0ce6928ffb8e46fe7 to your computer and use it in GitHub Desktop.
Redux reduce-reducers example
const mainReducer = combineReducers({a, b, c});
const secondReducer = function(state, action) {
switch(action.type) {
case SOME_ACTION:
return someSpecificReducer(state.a, state.c);
default: return state;
}
};
const rootReducer = reduceReducers(mainReducer, secondReducer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment