Skip to content

Instantly share code, notes, and snippets.

Created June 30, 2016 14:12
Show Gist options
  • Save anonymous/04967a6efd23a0976f7bed9f916204d9 to your computer and use it in GitHub Desktop.
Save anonymous/04967a6efd23a0976f7bed9f916204d9 to your computer and use it in GitHub Desktop.
import {combineReducers} from redux;
const reducer1InitialState = {
someFoo: {
someSubFoo: 1,
someSubFoo2: 2
},
someBar: {
someSubBar: 1,
someSubBar2: 2
}
}
const reducer1 = (state = reducer1InitialState, action) => {
/* your reducer logic */
}
const reducer2InitialState = {
someBaz: {
someSubBaz: 1,
someSubBaz2: 2
},
someFooz: {
someSubFooz: 1,
someSubFooz2: 2
}
}
const reducer2 = (state = reducer2InitialState, action) => {
/* your reducer logic */
}
export default combineReducers({
reducer1,
reducer2
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment