We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b65c10e commit 8ae6a4cCopy full SHA for 8ae6a4c
content/docs/hooks-reference.md
@@ -180,7 +180,7 @@ const value = useContext(MyContext);
180
181
接收一个 context 对象(`React.createContext` 的返回值)并返回该 context 的当前值。当前的 context 值由上层组件中距离当前组件最近的 `<MyContext.Provider>` 的 `value` prop 决定。
182
183
-当组件上层最近的 `<MyContext.Provider>` 更新时,该 Hook 会触发重渲染,并将最新的 context 的 `value` 值传递给 `MyContext` 的 provider。
+当组件上层最近的 `<MyContext.Provider>` 更新时,该 Hook 会触发重渲染,并使用最新传递给 `MyContext` provider 的 context `value` 值。
184
185
别忘记 `useContext` 的参数必须是 *context 对象本身*:
186
0 commit comments