Last active
April 14, 2016 18:24
-
-
Save scottcorgan/a1630b5e61924dfd4f2253341a62d879 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
let initialState = { | |
one: 'two', | |
three: 'four' | |
} | |
function update1 (state = initialState, action) { | |
switch (action.type) { | |
case SOMETHING: { | |
return state.one = 'changed' | |
} | |
default: { | |
return state; | |
} | |
} | |
} | |
function update2 (state, action) { | |
// etc. | |
} | |
let rootUpdate = combineReducers({ | |
update1: update1, // update1.one and update1.three | |
update2: update2 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment