-
-
Save eeue56/fbd608b650b34e735b2ebf87d8476970 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