Skip to content

Commit

Permalink
docs(cn): fix translation for persisit (reactjs#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCole21 authored Jul 16, 2021
1 parent 8044448 commit aa45d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/docs/hooks-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ const memoizedValue = useMemo(() => computeExpensiveValue(a, b), [a, b]);
const refContainer = useRef(initialValue);
```

`useRef` 返回一个可变的 ref 对象,其 `.current` 属性被初始化为传入的参数(`initialValue`)。返回的 ref 对象在组件的整个生命周期内保持不变
`useRef` 返回一个可变的 ref 对象,其 `.current` 属性被初始化为传入的参数(`initialValue`)。返回的 ref 对象在组件的整个生命周期内持续存在

一个常见的用例便是命令式地访问子组件:

Expand Down

0 comments on commit aa45d5c

Please sign in to comment.