Skip to content

Commit db41044

Browse files
authored
Update hooks-rules.md deterrent
1 parent 17c3171 commit db41044

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

content/docs/hooks-rules.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ next: hooks-custom.html
66
prev: hooks-effect.html
77
---
88

9+
<div class="scary">
10+
11+
> These docs are old and won't be updated. Go to [react.dev](https://react.dev/) for the new React docs.
12+
>
13+
> These new documentation pages teach modern React and include live examples:
14+
>
15+
> - [Rules of Hooks](https://react.dev/reference/rules/rules-of-hooks)
16+
> - [Components and Hooks must be pure
17+
](https://react.dev/reference/rules/components-and-hooks-must-be-pure)
18+
> - [React calls Components and Hooks](https://react.dev/reference/rules/react-calls-components-and-hooks)
19+
20+
</div>
21+
922
*Hooks* are a new addition in React 16.8. They let you use state and other React features without writing a class.
1023

1124
Hooks are JavaScript functions, but you need to follow two rules when using them. We provide a [linter plugin](https://www.npmjs.com/package/eslint-plugin-react-hooks) to enforce these rules automatically:

0 commit comments

Comments
 (0)