Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 5ca8096

Browse files
authored
Merge pull request #1015 from daronjay/patch-1
Suggested documentation update
2 parents 643aeab + 5bdcd70 commit 5ca8096

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/guides/models.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,21 @@ const store = createStore(combineForms({
9393

9494
You will then be able to pass your custom reducer's own actions and have it respond appropriately, and you will also be able to use RRF's `actions` to update the same model.
9595

96+
If you have other custom reducers you dont want modelled, the same result can be achieved with `createForms()`, using a custom reducer instead of an initialState object will give you access to RRF's `actions` and the model changes.
97+
98+
```jsx
99+
// ...
100+
import myCustomReducer from './myCustomReducer.js';
101+
import someOtherReducer from './someOtherReducer.js';
102+
103+
const store = createStore(combineReducers({
104+
someOther:someOtherReducer,//<= won't be modeled()
105+
...createForms({
106+
custom: myCustomReducer, // <= will be modeled()
107+
})
108+
}));
109+
// ...
110+
```
111+
96112

97113

0 commit comments

Comments
 (0)