Last active
March 20, 2017 22:48
-
-
Save StevenJL/c5639cb2805dcf4affb2 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
| import { combineReducers } from 'redux' | |
| // creating a composite reducer with constitute reducers via | |
| // the `combineReducers` method. | |
| const todoApp = combineReducers({ | |
| visibilityFilter, | |
| todos, | |
| }) | |
| // The above is equivalent to this | |
| function todoApp(state, action) = { | |
| return { | |
| visibilityFilter: visibilityFilter(state.visibilityFilter, action), | |
| todos: todos(state.todos, action) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment