Forked from markerikson/reduce-reducers-example.js
Created
November 27, 2017 23:48
-
-
Save big-kahuna-burger/2805b6a45f3cba02f2a324f7b3f81b0d to your computer and use it in GitHub Desktop.
Redux reduce-reducers example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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