Update redux.md

This commit is contained in:
Meet Zaveri 2018-01-08 16:25:55 +05:30 committed by GitHub
parent c0a545a817
commit a0bdfe2dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,13 @@ function counter (state = { value: 0 }, action) {
} }
} }
``` ```
### Combine Reducers
```js
// Combine Reducers into one whole Reducer with combineReducers function
const counterApp = combineReducers({counter,otherReducer,anotherReducer});
// You can list down reducers here and thanks to ES6 Object literal, we have to only pass key(if key and value are same).
```
```js ```js
let store = createStore(counter) let store = createStore(counter)