Skip to content

Commit eec3ae3

Browse files
committed
Resolve conflicts
1 parent 3249e05 commit eec3ae3

File tree

8 files changed

+6
-33
lines changed

8 files changed

+6
-33
lines changed

src/content/learn/build-a-react-app-from-scratch.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ Rsbuild には、ファストリフレッシュ、JSX、TypeScript、スタイ
6565

6666
#### React Native 用の Metro {/*react-native*/}
6767

68-
<<<<<<< HEAD
6968
React Native をゼロから始める場合は、React Native 用の JavaScript バンドラである [Metro](https://metrobundler.dev/) を使用する必要があります。Metro は iOS や Android などのプラットフォーム向けのバンドル機能をサポートしていますが、上記で紹介したツールと比較すると多くの機能が不足しています。プロジェクトが React Native のサポートを必要としているのでない限り、Vite、Parcel、または Rsbuild から始めることをお勧めします。
70-
=======
71-
If you're starting from scratch with React Native you'll need to use [Metro](https://metrobundler.dev/), the JavaScript bundler for React Native. Metro supports bundling for platforms like iOS and Android, but lacks many features when compared to the tools here. We recommend starting with Vite, Parcel, or Rsbuild unless your project requires React Native support.
72-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
7369

7470
</Note>
7571

src/content/learn/reusing-logic-with-custom-hooks.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,11 +1333,7 @@ export function useOnlineStatus() {
13331333
13341334
上記の例では、`useOnlineStatus` は [`useState`](/reference/react/useState) と [`useEffect`](/reference/react/useEffect) のペアで実装されています。しかし、これは最善のソリューションではありません。考慮されていないエッジケースがいくつかあります。例えば、コンポーネントがマウントされたとき `isOnline``true` であると仮定していますが、ネットワークがすでにオフラインになっていた場合、これは誤りです。ブラウザの [`navigator.onLine`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine) API を使ってそれをチェックすることはできますが、それを直接使うと、サーバで初期 HTML を生成する際には動作しません。要するに、このコードには改善の余地があるということです。
13351335
1336-
<<<<<<< HEAD
1337-
幸いなことに React 18 には、これらの問題をすべて解決してくれる専用の API である [`useSyncExternalStore`](/reference/react/useSyncExternalStore) が含まれています。以下は、この新しい API を活用して書き直された `useOnlineStatus` フックです。
1338-
=======
1339-
React includes a dedicated API called [`useSyncExternalStore`](/reference/react/useSyncExternalStore) which takes care of all of these problems for you. Here is your `useOnlineStatus` Hook, rewritten to take advantage of this new API:
1340-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
1336+
React には、これらの問題をすべて解決してくれる専用の API である [`useSyncExternalStore`](/reference/react/useSyncExternalStore) が含まれています。以下は、この新しい API を活用して書き直された `useOnlineStatus` フックです。
13411337
13421338
<Sandpack>
13431339

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,11 +2247,7 @@ body {
22472247
22482248
</Sandpack>
22492249
2250-
<<<<<<< HEAD
22512250
`map` に渡される関数の内部で `history` を反復処理する部分では、`squares` 引数が `history` の各要素を順に受け取り、`move` 引数が配列のインデックス `0`, `1`, `2`, … を順に受け取ります。(大抵は、実際の配列の中身が必要になりますが、今回の着手リストのレンダーで必要なのはインデックスの方だけです。)
2252-
=======
2253-
As you iterate through the `history` array inside the function you passed to `map`, the `squares` argument goes through each element of `history`, and the `move` argument goes through each array index: `0`, `1`, `2`, …. (In most cases, you'd need the actual array elements, but to render a list of moves you will only need indexes.)
2254-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
22552251
22562252
三目並べゲームの履歴にある着手のそれぞれについて、ボタン `<button>` の入ったリストアイテム `<li>` を作成します。ボタンには `jumpTo` という関数を呼び出す `onClick` ハンドラがありますが、これはまだ実装していません。
22572253

src/content/reference/react-dom/client/createRoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ React は `root` に `<App />` を表示し、その内部の DOM の管理を
9090
9191
* 同じルートに対して `render` を複数回呼び出すと、React は最新の JSX を反映するために必要なだけの DOM の更新を行います。React は、渡された JSX を以前にレンダーしたツリーと[「マッチング」](/learn/preserving-and-resetting-state)して、DOM のどの部分が再利用でき、どの部分を再作成する必要があるのかを決定します。同じルートに対して複数回 `render` を呼び出すことは、ルートコンポーネントで [`set` 関数](/reference/react/useState#setstate)を呼び出すことに似ており、React は不必要な DOM 更新を回避します。
9292
93-
* Although rendering is synchronous once it starts, `root.render(...)` is not. This means code after `root.render()` may run before any effects (`useLayoutEffect`, `useEffect`) of that specific render are fired. This is usually fine and rarely needs adjustment. In rare cases where effect timing matters, you can wrap `root.render(...)` in [`flushSync`](https://react.dev/reference/react-dom/client/flushSync) to ensure the initial render runs fully synchronously.
93+
* レンダーは一旦始まると同期的に行われますが、`root.render(...)` 自体はそうではありません。つまり `root.render()` の後のコードが、その特定のレンダー内のいずれかのエフェクト (`useLayoutEffect`, `useEffect`) よりも先に実行される可能性があるということです。これは通常問題なく、調整が必要になることは稀です。エフェクトのタイミングが重要となる稀なケースでは、初期レンダーが完全に同期的に実行されるように、`root.render(...)` [`flushSync`](https://react.dev/reference/react-dom/client/flushSync) で囲むことができます。
9494
9595
```js
9696
const root = createRoot(document.getElementById('root'));

src/content/reference/react-dom/hooks/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ title: "組み込みの React DOM フック"
1414

1515
*フォーム*により、情報を送信するためのインタラクティブなコントロールを作成できます。コンポーネント内でフォームを管理するために以下のフックを使用できます。
1616

17-
<<<<<<< HEAD
1817
* [`useFormStatus`](/reference/react-dom/hooks/useFormStatus) によりフォームのステータスに基づいて UI を更新できます。
19-
=======
20-
* [`useFormStatus`](/reference/react-dom/hooks/useFormStatus) allows you to make updates to the UI based on the status of a form.
21-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
2218

2319
```js
2420
function Form({ action }) {

src/content/reference/react/Component.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,11 +1273,7 @@ button { margin-left: 10px; }
12731273

12741274
エラーバウンダリコンポーネントを実装するためには、エラーに反応して state を更新し、ユーザにエラーメッセージを表示するための [`static getDerivedStateFromError`](#static-getderivedstatefromerror) を提供する必要があります。またオプションで、例えばエラーを分析サービスに記録するなどの追加のロジックを追加するために [`componentDidCatch`](#componentdidcatch) を実装することもできます。
12751275

1276-
<<<<<<< HEAD
1277-
<CanaryBadge /> [`captureOwnerStack`](/reference/react/captureOwnerStack) を使うことで開発中にオーナーのスタックトレースを含めることが可能です。
1278-
=======
1279-
With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.
1280-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
1276+
[`captureOwnerStack`](/reference/react/captureOwnerStack) を使うことで開発中にオーナーのスタックトレースを含めることが可能です。
12811277

12821278
```js {9-12,14-27}
12831279
import * as React from 'react';

src/content/reference/react/StrictMode.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,10 @@ Strict Mode のチェックは**開発中にのみ実行される**ものです
8686

8787
Strict Mode は開発中に以下のチェックを有効にします:
8888

89-
<<<<<<< HEAD
9089
- コンポーネントは、純粋でない (impure) レンダーによって引き起こされるバグを見つけるために、[レンダーを追加で 1 回行います](#fixing-bugs-found-by-double-rendering-in-development)
9190
- コンポーネントは、エフェクトのクリーンアップし忘れによるバグを見つけるために、[エフェクトの実行を追加で 1 回行います](#fixing-bugs-found-by-re-running-effects-in-development)
92-
- コンポーネントは、ref のクリーンアップし忘れによるバグを見つけるために、[ref コールバックの実行を追加で 1 回行います](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development)
91+
- コンポーネントは、ref のクリーンアップし忘れによるバグを見つけるために、[ref コールバックの実行を追加で 1 回行います](#fixing-bugs-found-by-re-running-ref-callbacks-in-development)
9392
- コンポーネントが[非推奨の API を使っていないかチェック](#fixing-deprecation-warnings-enabled-by-strict-mode)します。
94-
=======
95-
- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
96-
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
97-
- Your components will [re-run ref callbacks an extra time](#fixing-bugs-found-by-re-running-ref-callbacks-in-development) to find bugs caused by missing ref cleanup.
98-
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
99-
>>>>>>> 55986965fbf69c2584040039c9586a01bd54eba7
10093

10194
**これらのチェックはすべて開発環境専用であり、本番用ビルドには影響しません。**
10295

@@ -131,7 +124,7 @@ function App() {
131124

132125
<Note>
133126

134-
When `StrictMode` is enabled for a part of the app, React will only enable behaviors that are possible in production. For example, if `<StrictMode>` is not enabled at the root of the app, it will not [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) on initial mount, since this would cause child effects to double fire without the parent effects, which cannot happen in production.
127+
`StrictMode` がアプリの一部のみで有効になっている場合、React は本番環境で起こりえる動作のみを再現します。例えば、アプリのルートで <StrictMode> が有効になっていない場合、初期マウント時に[エフェクトを追加で再実行](#fixing-bugs-found-by-re-running-effects-in-development)することはなくなります。親エフェクトなしに子エフェクトが二重に発火することは本番環境では起こらないためです。
135128

136129
</Note>
137130

src/content/reference/react/useId.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function PasswordField() {
4646
4747
* `useId` を、**リスト内の key の生成には使用しないでください**。[key はデータから生成される必要があります。](/learn/rendering-lists#where-to-get-your-key)
4848
49-
* `useId` currently cannot be used in [async Server Components](/reference/rsc/server-components#async-components-with-server-components).
49+
* 現在のところ、`useId` は[非同期のサーバコンポーネント](/reference/rsc/server-components#async-components-with-server-components)では利用できません。
5050
5151
---
5252

0 commit comments

Comments
 (0)