Skip to content

Commit dda5b49

Browse files
elstgavlex111
authored andcommitted
Swap word order (#2020)
Figure this was a typo
1 parent 7b217c7 commit dda5b49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/hooks-custom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Custom Hooks offer the flexibility of sharing logic that wasn't possible in Reac
201201

202202
Try to resist adding abstraction too early. Now that function components can do more, it's likely that the average function component in your codebase will become longer. This is normal -- don't feel like you *have to* immediately split it into Hooks. But we also encourage you to start spotting cases where a custom Hook could hide complex logic behind a simple interface, or help untangle a messy component.
203203

204-
For example, maybe you have a complex component that contains a lot of local state that is managed in an ad-hoc way. `useState` doesn't make centralizing the update logic any easier so might you prefer to write it as a [Redux](https://redux.js.org/) reducer:
204+
For example, maybe you have a complex component that contains a lot of local state that is managed in an ad-hoc way. `useState` doesn't make centralizing the update logic any easier so you might prefer to write it as a [Redux](https://redux.js.org/) reducer:
205205

206206
```js
207207
function todosReducer(state, action) {

0 commit comments

Comments
 (0)