Skip to content

Commit

Permalink
fix: correct translations (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoTim authored Oct 7, 2023
1 parent 12ad0b6 commit d6c035b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/learn/synchronizing-with-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ video { width: 250px; }

依赖数组可以包含多个依赖项。当指定的所有依赖项在上一次渲染期间的值与当前值完全相同时,React 会跳过重新运行该 Effect。React 使用 [`Object.is`](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is) 比较依赖项的值。有关详细信息,请参阅 [`useEffect` 参考文档](/reference/react/useEffect#reference)

**请注意,不能随意选择依赖项**。如果你指定的依赖项不能与 Effect 代码所期望的相匹配时,lint 将会报错,这将帮助你找到代码中的问题。如果你希望重复执行[那么你应当 **重新编辑 Effect 代码本身**,使其不需要该依赖项](/learn/lifecycle-of-reactive-effects#what-to-do-when-you-dont-want-to-re-synchronize)
**请注意,不能随意选择依赖项**。如果你指定的依赖项不能与 Effect 代码所期望的相匹配时,lint 将会报错,这将帮助你找到代码中的问题。如果你不希望某些代码重新运行[那么你应当 **重新编辑 Effect 代码本身**,使其不需要该依赖项](/learn/lifecycle-of-reactive-effects#what-to-do-when-you-dont-want-to-re-synchronize)

<Pitfall>

Expand Down

0 comments on commit d6c035b

Please sign in to comment.