Last active
April 10, 2017 17:04
-
-
Save Temzasse/ae3e3b5c5125dd579d0ec7b61496cb60 to your computer and use it in GitHub Desktop.
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
import { combineReducers } from 'redux'; | |
// Import subreducers | |
import editReducer from './edit/ducks'; | |
import detailsReducer from './details/ducks'; | |
import listReducer from './list/ducks'; | |
const initialState = { | |
// common stuff here | |
}; | |
function reducer(state = initialState, action = {}) { | |
switch (action.type) { | |
case 'SOMETHING': | |
... | |
default: | |
return state; | |
} | |
} | |
export default combineReducers({ | |
common: reducer, | |
edit: editReducer, | |
list: listReducer, | |
details: detailsReducer, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment