diff --git a/docs/recipes/reducers/03-RefactoringReducersExample.md b/docs/recipes/reducers/03-RefactoringReducersExample.md index b525dd0224..63d3a5df39 100644 --- a/docs/recipes/reducers/03-RefactoringReducersExample.md +++ b/docs/recipes/reducers/03-RefactoringReducersExample.md @@ -48,7 +48,7 @@ function appReducer(state = initialState, action) { } return Object.assign({}, todo, { - text : !action.text + text : action.text }) }) }); @@ -417,4 +417,4 @@ const appReducer = combineReducers({ We now have examples of several kinds of split-up reducer functions: helper utilities like `updateObject` and `createReducer`; handlers for specific cases like `setVisibilityFilter` and `addTodo`; and slice-of-state handlers like `visibilityReducer` and `todosReducer`. We also can see that `appReducer` is an example of a "root reducer". -Although the final result in this example is noticeably longer than the original version, this is primarily due to the extraction of the utility functions, the addition of comments, and some deliberate verbosity for the sake of clarity, such as separate return statements. Looking at each function individually, the amount of responsibility is now smaller, and the intent is hopefully clearer. Also, in a real application, these functions would probably then be split into separate files such as `reducerUtilities.js`, `visibilityReducer.js`, `todosReducer.js`, and `rootReducer.js`. \ No newline at end of file +Although the final result in this example is noticeably longer than the original version, this is primarily due to the extraction of the utility functions, the addition of comments, and some deliberate verbosity for the sake of clarity, such as separate return statements. Looking at each function individually, the amount of responsibility is now smaller, and the intent is hopefully clearer. Also, in a real application, these functions would probably then be split into separate files such as `reducerUtilities.js`, `visibilityReducer.js`, `todosReducer.js`, and `rootReducer.js`.