You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/combineReducers.md
+26-14Lines changed: 26 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,15 @@ reducing function you can pass to [`createStore`](createStore.md).
7
7
8
8
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`.
9
9
10
-
>##### A Note for Flux Users
10
+
>##### A Note for Flux Users
11
11
12
-
>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.
12
+
>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.
13
13
14
14
#### Arguments
15
15
16
-
1.`reducers` (*Object*): An object whose values correspond to different reducing functions that need to be combined into one. One handy way to obtain it is to use ES6 `import * as reducers` syntax, but you can also construct this object manually. See the notes below for some rules every passed reducer must follow.
16
+
1.`reducers` (*Object*): An object whose values correspond to different reducing functions that need to be combined into one. See the notes below for some rules every passed reducer must follow.
17
+
18
+
> Earlier documentation suggested the use of the ES6 `import * as reducers` syntax to obtain the reducers object. This was the source of a lot of confusion, which is why we now recommend exporting a single reducer obtained using `combineReducers()` from `reducers/index.js` instead. An example is included below.
17
19
18
20
#### Returns
19
21
@@ -35,19 +37,23 @@ While `combineReducers` attempts to check that your reducers conform to some of
0 commit comments