|
@@ -42,3 +42,20 @@ will be fetched and passed to a sub-reducer:
|
|
|
```
|
|
|
|
|
|
This technique is mentioned in Redux docs, in "Beyond combineReducers" page.
|
|
|
+
|
|
|
+## `composeReducers(reducer1, reducer2, ...)`
|
|
|
+
|
|
|
+Creates a wrapper reducer that calls passed reducers
|
|
|
+one after another, passing intermediate states.
|
|
|
+and returning the result of the last one.
|
|
|
+
|
|
|
+Useful to "concatenate" a few `subReducer`s. like:
|
|
|
+
|
|
|
+```js
|
|
|
+ combineReducers(
|
|
|
+ subReducer("files.persons", personReducer, "assets.swag"),
|
|
|
+ subReducer("files.clients", clientReducer, "news"),
|
|
|
+ subReducer("assets", assetReducer),
|
|
|
+ baseReducer
|
|
|
+ )
|
|
|
+```
|