We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
generating reducers
1 parent dd2844f commit b8b596eCopy full SHA for b8b596e
docs/recipes/ReducingBoilerplate.md
@@ -505,7 +505,7 @@ Let's write a function that lets us express reducers as an object mapping from a
505
506
```js
507
export const todos = createReducer([], {
508
- [ActionTypes.ADD_TODO](state, action) {
+ [ActionTypes.ADD_TODO]: (state, action) => {
509
let text = action.text.trim()
510
return [...state, text]
511
}
0 commit comments