Skip to content

Commit 40495cb

Browse files
authored
Merge pull request #1668 from neighborhood999/fix-hooks-overview
docs(hooks): fix break anchor link
2 parents f767be6 + 4647eea commit 40495cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: content/docs/hooks-overview.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hooks are [backwards-compatible](/docs/hooks-intro.html#no-breaking-changes). Th
1616
1717
**↑↑↑ Each section ends with a yellow box like this.** They link to detailed explanations.
1818

19-
## 📌 State Hook {#-state-hook}
19+
## 📌 State Hook {#state-hook}
2020

2121
This example renders a counter. When you click the button, it increments the value:
2222

@@ -68,7 +68,7 @@ React provides a few built-in Hooks like `useState`. You can also create your ow
6868
>
6969
>You can learn more about the State Hook on a dedicated page: [Using the State Hook](/docs/hooks-state.html).
7070
71-
## ⚡️ Effect Hook {#️-effect-hook}
71+
## ⚡️ Effect Hook {#effect-hook}
7272

7373
You've likely performed data fetching, subscriptions, or manually changing the DOM from React components before. We call these operations "side effects" (or "effects" for short) because they can affect other components and can't be done during rendering.
7474

@@ -159,7 +159,7 @@ Hooks let you organize side effects in a component by what pieces are related (s
159159
>
160160
>You can learn more about `useEffect` on a dedicated page: [Using the Effect Hook](/docs/hooks-effect.html).
161161
162-
## ✌️ Rules of Hooks {#️-rules-of-hooks}
162+
## ✌️ Rules of Hooks {#rules-of-hooks}
163163

164164
Hooks are JavaScript functions, but they impose two additional rules:
165165

@@ -172,7 +172,7 @@ We provide a [linter plugin](https://www.npmjs.com/package/eslint-plugin-react-h
172172
>
173173
>You can learn more about these rules on a dedicated page: [Rules of Hooks](/docs/hooks-rules.html).
174174
175-
## 💡 Building Your Own Hooks {#-building-your-own-hooks}
175+
## 💡 Building Your Own Hooks {#building-your-own-hooks}
176176

177177
Sometimes, we want to reuse some stateful logic between components. Traditionally, there were two popular solutions to this problem: [higher-order components](/docs/higher-order-components.html) and [render props](/docs/render-props.html). Custom Hooks let you do this, but without adding more components to your tree.
178178

@@ -239,7 +239,7 @@ You can write custom Hooks that cover a wide range of use cases like form handli
239239
>
240240
>You can learn more about custom Hooks on a dedicated page: [Building Your Own Hooks](/docs/hooks-custom.html).
241241
242-
## 🔌 Other Hooks {#-other-hooks}
242+
## 🔌 Other Hooks {#other-hooks}
243243

244244
There are a few less commonly used built-in Hooks that you might find useful. For example, [`useContext`](/docs/hooks-reference.html#usecontext) lets you subscribe to React context without introducing nesting:
245245

0 commit comments

Comments
 (0)