rootReducer = combineReducers({
reducer1: reducer1,
reducer2: reducer2
})
function reducer1(state ={data: []}, action) {
switch (action.type) {
case SOME_ACTION:
return {...state, data[store.reducer2.id]: action.payload}
default:
return state
}
}
const action = value => (dispatch, getState) => {
const otherValue = otherValueSelector(getState());
const payload = calculate(value, otherValue);
dispatch(otherAction(payload));
};