Skip to content

Commit 06ac006

Browse files
committed
Merge pull request reduxjs#1460 from Frezc/patch-1
initialState is necessary in reducer
2 parents 3dfdd0a + d2715f6 commit 06ac006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/basics/Reducers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ const reducer = combineReducers({
336336
```
337337

338338
```js
339-
function reducer(state, action) {
339+
function reducer(state = {}, action) {
340340
return {
341341
a: doSomethingWithA(state.a, action),
342342
b: processB(state.b, action),

0 commit comments

Comments
 (0)