From a9a60e324c2c42eee38db68ea9bd38c67128a43c Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Wed, 30 Oct 2024 09:40:15 -0400 Subject: [PATCH] "first downside" -> "downside" The Deep Dive section focuses on the issue of the linter not warning about reactive dependencies and never brings up a second downside. --- src/content/learn/separating-events-from-effects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/separating-events-from-effects.md b/src/content/learn/separating-events-from-effects.md index 21276c28710..5e8827c5d5a 100644 --- a/src/content/learn/separating-events-from-effects.md +++ b/src/content/learn/separating-events-from-effects.md @@ -727,7 +727,7 @@ function Page({ url }) { After `useEffectEvent` becomes a stable part of React, we recommend **never suppressing the linter**. -The first downside of suppressing the rule is that React will no longer warn you when your Effect needs to "react" to a new reactive dependency you've introduced to your code. In the earlier example, you added `url` to the dependencies *because* React reminded you to do it. You will no longer get such reminders for any future edits to that Effect if you disable the linter. This leads to bugs. +The downside of suppressing the rule is that React will no longer warn you when your Effect needs to "react" to a new reactive dependency you've introduced to your code. In the earlier example, you added `url` to the dependencies *because* React reminded you to do it. You will no longer get such reminders for any future edits to that Effect if you disable the linter. This leads to bugs. Here is an example of a confusing bug caused by suppressing the linter. In this example, the `handleMove` function is supposed to read the current `canMove` state variable value in order to decide whether the dot should follow the cursor. However, `canMove` is always `true` inside `handleMove`.