Skip to content

Commit 5f7006c

Browse files
committed
Emphazises combineReducers change the state object form
1 parent 5830a21 commit 5f7006c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/api/combineReducers.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ As your app grows more complex, you’ll want to split your [reducing function](
44

55
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).
66

7-
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`.
7+
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`**.
88

9+
Consequently, the state object will look like this :
10+
11+
```
12+
state : {
13+
reducer1: ...
14+
reducer2: ...
15+
}
16+
```
917
> ##### A Note for Flux Users
1018
1119
> 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.

0 commit comments

Comments
 (0)