Skip to content

Commit 0b2b666

Browse files
committed
wip
1 parent a0a5aca commit 0b2b666

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/reference/react/useContext.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function Form() {
8585
8686
<Pitfall>
8787
88-
`useContext()` は常に呼び出しを行うコンポーネントの上にある最も近くにあるプロバイダを探します。上向きに探索し`useContext()` を呼び出しているコンポーネントからプロバイダを**考慮しません**。
88+
`useContext()` は、呼び出すコンポーネントより最も近い上位にあるプロバイダを常に探します。上位に検索し`useContext()` を呼び出したコンポーネントにあるプロバイダは**考慮しません**。
8989
9090
</Pitfall>
9191
@@ -175,9 +175,9 @@ function Button({ children }) {
175175
176176
---
177177
178-
### コンテクストを経由したデータの更新 {/*updating-data-passed-via-context*/}
178+
### コンテクストを介したデータの更新 {/*updating-data-passed-via-context*/}
179179
180-
多くの場合、時間とともにコンテクストが変更されることが望まれます。コンテクストを更新するためには、[state.](/reference/react/useState) と組み合わせます。親コンポーネントで state 変数を宣言し、その現在の state を <CodeStep step={2}>context value</CodeStep> としてプロバイダに渡します。
180+
多くの場合、時間とともにコンテクストを変化させたいと思うでしょう。コンテクストを更新するために、それを [state.](/reference/react/useState) と組み合わせてください。親コンポーネントで state 変数を宣言します。親コンポーネントで state 変数を宣言して、現在の state を <CodeStep step={2}>コンテクストの値</CodeStep> としてプロバイダに渡します。
181181
182182
```js {2} [[1, 4, "ThemeContext"], [2, 4, "theme"], [1, 11, "ThemeContext"]]
183183
function MyPage() {

0 commit comments

Comments
 (0)