You can definitely have reducers inside of reducers; in fact, the redux demo app does this: http://redux.js.org/docs/basics/Reducers.html.
For example, you might make a nested reducer called `discounts’:
function discounts(state, action) {
switch (action.type) {
case ADD_DISCOUNT:
return state.concat([action.payload]);
// etc etc
}
}
And then make use of this reducer in your account reducer:
function account(state, action) {
switch (action.type) {
case ADD_DISCOUNT:
return {
...state,
discounts: discounts(state.discounts, action)
};
// etc etc
}
}
To learn more, check out the egghead.io redux series by Dan himself, specifically the reducer composition video!