Skip to content

Instantly share code, notes, and snippets.

@Temzasse
Last active April 10, 2017 17:04
Show Gist options
  • Save Temzasse/ae3e3b5c5125dd579d0ec7b61496cb60 to your computer and use it in GitHub Desktop.
Save Temzasse/ae3e3b5c5125dd579d0ec7b61496cb60 to your computer and use it in GitHub Desktop.
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