Skip to content

Commit 8ae6a4c

Browse files
yangmingshanQC-L
authored andcommitted
docs(cn): revise content/docs/hooks-reference.md (#205)
1 parent b65c10e commit 8ae6a4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/hooks-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const value = useContext(MyContext);
180180

181181
接收一个 context 对象(`React.createContext` 的返回值)并返回该 context 的当前值。当前的 context 值由上层组件中距离当前组件最近的 `<MyContext.Provider>``value` prop 决定。
182182

183-
当组件上层最近的 `<MyContext.Provider>` 更新时,该 Hook 会触发重渲染,并将最新的 context 的 `value` 值传递给 `MyContext` 的 provider
183+
当组件上层最近的 `<MyContext.Provider>` 更新时,该 Hook 会触发重渲染,并使用最新传递给 `MyContext` provider 的 context `value`
184184

185185
别忘记 `useContext` 的参数必须是 *context 对象本身*
186186

0 commit comments

Comments
 (0)