Skip to content

Commit 2a1709a

Browse files
authored
Merge pull request #1 from Lucretiel/master
Update README with docs about optional reducers.
2 parents 8193410 + 2843315 commit 2a1709a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ handleAction('FETCH_DATA', {
9393
});
9494
```
9595

96+
If you leave either reducer unspecified, the wrapped reducer will treat that reducer as a no-op, returning the state unchanged.
97+
98+
```js
99+
handleAction('FETCH_DATA', {
100+
next(state, action) {...}
101+
// State will be unchanged in the event of an error
102+
});
103+
```
104+
96105
The optional third parameter specifies a default or initial state, which is used when `undefined` is passed to the reducer.
97106

98107
### `handleActions(reducerMap, ?defaultState)`

0 commit comments

Comments
 (0)