Browse Source
docs: fix `react-hooks/exhaustive-dependencies` typo (#5605)
The rule is `exhaustive-deps`, not `exhaustive-dependencies`.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
main
Eng Zer Jun
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
3 deletions
-
beta/src/content/learn/lifecycle-of-reactive-effects.md
-
beta/src/content/learn/removing-effect-dependencies.md
-
beta/src/content/reference/react/useEffect.md
|
@ -748,7 +748,7 @@ If you have an existing codebase, you might have some Effects that suppress the |
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
// ... |
|
|
// ... |
|
|
// 🔴 Avoid suppressing the linter like this: |
|
|
// 🔴 Avoid suppressing the linter like this: |
|
|
// eslint-ignore-next-line react-hooks/exhaustive-dependencies |
|
|
// eslint-ignore-next-line react-hooks/exhaustive-deps |
|
|
}, []); |
|
|
}, []); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
@ -285,7 +285,7 @@ If you have an existing codebase, you might have some Effects that suppress the |
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
// ... |
|
|
// ... |
|
|
// 🔴 Avoid suppressing the linter like this: |
|
|
// 🔴 Avoid suppressing the linter like this: |
|
|
// eslint-ignore-next-line react-hooks/exhaustive-dependencies |
|
|
// eslint-ignore-next-line react-hooks/exhaustive-deps |
|
|
}, []); |
|
|
}, []); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
@ -1130,7 +1130,7 @@ If you have an existing codebase, you might have some Effects that suppress the |
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
// ... |
|
|
// ... |
|
|
// 🔴 Avoid suppressing the linter like this: |
|
|
// 🔴 Avoid suppressing the linter like this: |
|
|
// eslint-ignore-next-line react-hooks/exhaustive-dependencies |
|
|
// eslint-ignore-next-line react-hooks/exhaustive-deps |
|
|
}, []); |
|
|
}, []); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|