Skip to content

Instantly share code, notes, and snippets.

@scottcorgan
Last active April 14, 2016 18:24
Show Gist options
  • Save scottcorgan/a1630b5e61924dfd4f2253341a62d879 to your computer and use it in GitHub Desktop.
Save scottcorgan/a1630b5e61924dfd4f2253341a62d879 to your computer and use it in GitHub Desktop.
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