Skip to content

Commit 5bb2bfc

Browse files
committed
docs: fix missing use in reducer comparison sentence
Signed-off-by: Sebastian Legarraga <64795732+slegarraga@users.noreply.github.com>
1 parent c7d6b70 commit 5bb2bfc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/content/learn/extracting-state-logic-into-a-reducer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ Reducers are not without downsides! Here's a few ways you can compare them:
874874
- **Testing:** A reducer is a pure function that doesn't depend on your component. This means that you can export and test it separately in isolation. While generally it's best to test components in a more realistic environment, for complex state update logic it can be useful to assert that your reducer returns a particular state for a particular initial state and action.
875875
- **Personal preference:** Some people like reducers, others don't. That's okay. It's a matter of preference. You can always convert between `useState` and `useReducer` back and forth: they are equivalent!
876876

877-
We recommend using a reducer if you often encounter bugs due to incorrect state updates in some component, and want to introduce more structure to its code. You don't have to use reducers for everything: feel free to mix and match! You can even `useState` and `useReducer` in the same component.
877+
We recommend using a reducer if you often encounter bugs due to incorrect state updates in some component, and want to introduce more structure to its code. You don't have to use reducers for everything: feel free to mix and match! You can even use `useState` and `useReducer` in the same component.
878878

879879
## Writing reducers well {/*writing-reducers-well*/}
880880

0 commit comments

Comments
 (0)