Skip to content

Commit

Permalink
docs(cn): fix typo (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangmaniu authored Jul 19, 2023
1 parent 6f9dbfb commit c044e3c
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 @@ -441,7 +441,7 @@ function VideoPlayer({ src, isPlaying }) {
}, [isPlaying]);
```
这是因为 `ref` 具有 **稳定** 的标识:React 保证 [每轮渲染中调用 `useRef` 所产生的引用对象时,获取到的对象引用总是相同的](/reference/react/useRef#returns),即获取到的对象引用永远不会改变,所以它不会导致重新运行 Effect。因此,依赖数组中是否包含它并不重要。当然也可以包括它,这样也可以:
这是因为 `ref` 具有 **稳定** 的标识:React 保证 [每轮渲染中调用 `useRef` 所产生的引用对象时,获取到的对象引用总是相同的](/reference/react/useRef#returns),即获取到的对象引用永远不会改变,所以它不会导致重新运行 Effect。因此,依赖数组中是否包含它并不重要。当然也可以包括它,这样也可以:
```js {9}
function VideoPlayer({ src, isPlaying }) {
Expand Down

0 comments on commit c044e3c

Please sign in to comment.