Skip to content

Instantly share code, notes, and snippets.

Created June 30, 2016 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7c8f15e317f5f02ae03b3b5956cd0d32 to your computer and use it in GitHub Desktop.
Save anonymous/7c8f15e317f5f02ae03b3b5956cd0d32 to your computer and use it in GitHub Desktop.
import {combineReducers} from redux;
const someSubFooInitialState = {
someSubFoo: 1,
someSubFoo2: 2
}
const someSubBarInitialState = {
someSubBar: 1,
someSubBar2: 2
}
const someSubFoo = (state = someSubFooInitialState, action) => {
/* your reducer logic */
}
const someSubBar = (state = someSubFooInitialState, action) => {
/* your reducer logic */
}
export default combineReducers({
someSubFoo,
someSubBar
});
import {combineReducers} from redux;
const someSubBazInitialState = {
someSubBaz: 1,
someSubBaz2: 2
}
const someSubFoozInitialState = {
someSubFooz: 1,
someSubFooz2: 2
}
const someSubBaz = (state = someSubBazInitialState, action) => {
/* your reducer logic */
}
const someSubFooz = (state = someSubFoozInitialState, action) => {
/* your reducer logic */
}
export default combineReducers({
someSubBaz,
someSubFooz
});
import {combineReducers} from redux;
import reducer1 from './reducer1';
import reducer2 from './reducer2';
export default combineReducers({
reducer1,
reducer2
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment