Skip to content

Instantly share code, notes, and snippets.

View Stanley-Yao's full-sized avatar
🏠
Working from home

Stanley Stanley-Yao

🏠
Working from home
View GitHub Profile
@Stanley-Yao
Stanley-Yao / reduce-reducers-example.js
Created November 11, 2018 21:56 — forked from markerikson/reduce-reducers-example.js
Redux reduce-reducers example
const mainReducer = combineReducers({a, b, c});
const secondReducer = function(state, action) {
switch(action.type) {
case SOME_ACTION:
return someSpecificReducer(state.a, state.c);
default: return state;
}
};