Skip to content

Commit

Permalink
Merge pull request reduxjs#1169 from vnctaing/patch-2
Browse files Browse the repository at this point in the history
Emphazises combineReducers change the state object form
  • Loading branch information
gaearon committed Dec 22, 2015
2 parents 5830a21 + 5f7006c commit e1b2a95
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/api/combineReducers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ As your app grows more complex, you’ll want to split your [reducing function](

The `combineReducers` helper function turns an object whose values are different reducing functions into a single reducing function you can pass to [`createStore`](createStore.md).

The resulting reducer calls every child reducer, and gather their results into a single state object. The shape of the state object matches the keys of the passed `reducers`.
The resulting reducer calls every child reducer, and gather their results into a single state object. **The shape of the state object matches the keys of the passed `reducers`**.

Consequently, the state object will look like this :

```
state : {
reducer1: ...
reducer2: ...
}
```
> ##### A Note for Flux Users
> This function helps you organize your reducers to manage their own slices of state, similar to how you would have different Flux Stores to manage different state. With Redux, there is just one store, but `combineReducers` helps you keep the same logical division between reducers.
Expand Down

0 comments on commit e1b2a95

Please sign in to comment.