Skip to content

Commit fb39485

Browse files
authored
fix: typo in useReducer documentation (#7314)
1 parent e0ec287 commit fb39485

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)