Skip to content

Commit 093cac4

Browse files
committed
wip
1 parent 0371e7d commit 093cac4

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
@@ -949,15 +949,15 @@ ul, li { margin: 0; padding: 0; }
949949
950950
### フォールバックのデフォルト値の指定 {/*specifying-a-fallback-default-value*/}
951951
952-
React が親ツリー中に特定の<CodeStep step={1}>コンテクスト</CodeStep>のプロバイダを見つけることができない場合`useContext()` が返すコンテクストの値は、[そのコンテキストを作成](/reference/react/createContext)したときに指定した<CodeStep step={3}>デフォルト値</CodeStep>と等しくなります:
952+
React が特定の<CodeStep step={1}>コンテクスト</CodeStep>のプロバイダを親ツリーで見つけれたら`useContext()` が返すコンテクストの値は、[コンテキストを作成](/reference/react/createContext)したときに指定した<CodeStep step={3}>デフォルト値</CodeStep>と等しくなります:
953953
954954
```js [[1, 1, "ThemeContext"], [3, 1, "null"]]
955955
const ThemeContext = createContext(null);
956956
```
957957
958-
デフォルト値は**決して変わりません**。コンテクストを更新するには、[上記で説明したように](#updating-data-passed-via-context)、状態と共に使用します
958+
デフォルト値は**絶対に変更されません**。コンテクストを更新したいなら、[上記で説明したように](#updating-data-passed-via-context)、state と一緒に使用します
959959
960-
よくあることですが`null` の代わりに、デフォルトとして使用できるより意味のある値があります。例えば
960+
多くの場合`null` の代わりにデフォルトとして意味のある値を使います。例えば :
961961
962962
```js [[1, 1, "ThemeContext"], [3, 1, "light"]]
963963
const ThemeContext = createContext('light');

0 commit comments

Comments
 (0)