Skip to content

Commit

Permalink
Merge pull request #3877 from leburgeon/patch-4
Browse files Browse the repository at this point in the history
Update part7b.md
  • Loading branch information
mluukkai authored Nov 20, 2024
2 parents 6887496 + 25a0c43 commit d01cbc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/7/en/part7b.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Within the last couple of years, many React libraries have begun to offer hook-b

The [React Router's](https://reactrouter.com/en/main/start/tutorial) API we introduced in the [previous part](/en/part7/react_router) is also partially hook-based. Its hooks can be used to access URL parameters and the <i>navigation</i> object, which allows for manipulating the browser URL programmatically.

As mentioned in [part 1](/en/part1/a_more_complex_state_debugging_react_apps#rules-of-hooks), hooks are not normal functions, and when using those we have to adhere to certain [rules or limitations](https://react.dev/warnings/invalid-hook-call-warning#breaking-rules-of-hooks). Let's recap the rules of using hooks, copied verbatim from the official React documentation:
As mentioned in [part 1](/en/part1/a_more_complex_state_debugging_react_apps#rules-of-hooks), hooks are not normal functions, and when using these we have to adhere to certain [rules or limitations](https://react.dev/warnings/invalid-hook-call-warning#breaking-rules-of-hooks). Let's recap the rules of using hooks, copied verbatim from the official React documentation:

**Don’t call Hooks inside loops, conditions, or nested functions.** Instead, always use Hooks at the top level of your React function.

Expand Down

0 comments on commit d01cbc5

Please sign in to comment.