Skip to content

Commit 7ff525b

Browse files
committed
wip
1 parent a6a34fd commit 7ff525b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: src/content/reference/react/useContext.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const value = useContext(SomeContext)
2020

2121
### `useContext(SomeContext)` {/*usecontext*/}
2222

23-
コンポーネントのトップレベルで `useContext` を呼び出して、[context.](/learn/passing-data-deeply-with-context) を読み込んでサブスクライブします
23+
コンポーネントのトップレベルで `useContext` を呼び出して、[コンテクスト](/learn/passing-data-deeply-with-context) を読み取り、サブスクライブします
2424

2525
```js
2626
import { useContext } from 'react';
@@ -34,7 +34,7 @@ function MyComponent() {
3434
3535
#### 引数 {/*parameters*/}
3636
37-
* `SomeContext`: 事前に [`createContext`](/reference/react/createContext) で作成した context になります。context 自体は情報を保持しておらず、コンポーネントから提供したり、読み取ったりできる情報の種類を表しているに過ぎません。
37+
* `SomeContext`: 事前に [`createContext`](/reference/react/createContext) で作成したコンテクストになります。コンテクスト自体は情報を保持しておらず、コンポーネントから提供したり、読み取ったりできる情報の種類を表しているに過ぎません。
3838
3939
#### 返り値 {/*returns*/}
4040
@@ -48,12 +48,11 @@ function MyComponent() {
4848
4949
---
5050
51-
## 使用法 {/*usage*/}
52-
51+
## 使い方 {/*usage*/}
5352
5453
### ツリーの深い部分にデータを渡す {/*passing-data-deeply-into-the-tree*/}
5554
56-
コンポーネントのトップレベルで `useContext` を呼び出して [context.](/learn/passing-data-deeply-with-context) を読み込み、サブスクライブします。
55+
コンポーネントのトップレベルで `useContext` を呼び出して [コンテクスト](/learn/passing-data-deeply-with-context) を読み取り、サブスクライブします。
5756
5857
```js [[2, 4, "theme"], [1, 4, "ThemeContext"]]
5958
import { useContext } from 'react';
@@ -175,9 +174,9 @@ function Button({ children }) {
175174
176175
---
177176
178-
### context を介したデータの更新 {/*updating-data-passed-via-context*/}
177+
### コンテクストを経由したデータの更新 {/*updating-data-passed-via-context*/}
179178
180-
多くの場合、時間とともに context が変更されることが望まれます。context を更新するためには、[state.](/reference/react/useState) と組み合わせます。親コンポーネントで state 変数を宣言し、その現在の state を <CodeStep step={2}>context value</CodeStep> としてプロバイダに渡します。
179+
多くの場合、時間とともにコンテクストが変更されることが望まれます。コンテクストを更新するためには、[state.](/reference/react/useState) と組み合わせます。親コンポーネントで state 変数を宣言し、その現在の state を <CodeStep step={2}>context value</CodeStep> としてプロバイダに渡します。
181180
182181
```js {2} [[1, 4, "ThemeContext"], [2, 4, "theme"], [1, 11, "ThemeContext"]]
183182
function MyPage() {

0 commit comments

Comments
 (0)