Skip to content

Commit c194a28

Browse files
committed
Resolve conflicts
1 parent 9983a54 commit c194a28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+187
-890
lines changed

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@
2222
"check-all": "npm-run-all prettier lint:fix tsc rss",
2323
"rss": "node scripts/generateRss.js",
2424
"deadlinks": "node scripts/deadLinkChecker.js",
25-
<<<<<<< HEAD
25+
"copyright": "node scripts/copyright.js",
26+
"test:eslint-local-rules": "yarn --cwd eslint-local-rules test",
2627
"textlint": "cd textlint && yarn --frozen-lockfile && yarn textlint",
2728
"textlint-staged": "cd textlint && yarn --frozen-lockfile && yarn textlint-staged --"
28-
=======
29-
"copyright": "node scripts/copyright.js",
30-
"test:eslint-local-rules": "yarn --cwd eslint-local-rules test"
31-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
3229
},
3330
"dependencies": {
3431
"@codesandbox/sandpack-react": "2.13.5",

src/components/Layout/HomeContent.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,21 +268,13 @@ export function HomeContent() {
268268
フルスタックな開発を
269269
</Header>
270270
<Para>
271-
<<<<<<< HEAD
272271
React はライブラリです。{''}
273272
コンポーネントを組み合わせることはできますが、{''}
274273
ルーティングやデータフェッチの方法までは指定しません。{''}
275274
React でアプリ全体を構築する場合は、{''}
276275
<Link href="https://nextjs.org">Next.js</Link>{' '}
277-
<Link href="https://remix.run">Remix</Link>{' '}
276+
<Link href="https://reactrouter.com">React Router</Link>{' '}
278277
のようなフルスタックのフレームワークをお勧めします。
279-
=======
280-
React is a library. It lets you put components together, but it
281-
doesn’t prescribe how to do routing and data fetching. To build an
282-
entire app with React, we recommend a full-stack React framework
283-
like <Link href="https://nextjs.org">Next.js</Link> or{' '}
284-
<Link href="https://reactrouter.com">React Router</Link>.
285-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
286278
</Para>
287279
</Center>
288280
<FullBleed>

src/content/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ React Labs 記事では、現在活発に研究・開発が行われているプ
1515

1616
</Intro>
1717

18-
<<<<<<< HEAD
19-
<Note>
20-
21-
5 月 15 日・16 日にネバダ州ヘンダーソンで React Conf 2024 が開催されます! 現地で React Conf に参加を希望される方は、2 月 28 日までに[チケットの抽選に参加](https://forms.reform.app/bLaLeE/react-conf-2024-ticket-lottery/1aRQLK)してください。
22-
23-
チケット、無料ストリーミング、スポンサーシップなどの詳細については、[React Conf のウェブサイト](https://conf.react.dev)をご覧ください。
24-
25-
</Note>
26-
27-
=======
28-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
2918
---
3019

3120
## React Compiler {/*react-compiler*/}

src/content/blog/2024/10/21/react-compiler-beta-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ October 21, 2024 by [Lauren Tan](https://twitter.com/potetotes).
1212

1313
<Note>
1414

15-
### React Compiler is now stable! {/*react-compiler-is-now-in-rc*/}
15+
### React Compiler は安定版となりました! {/*react-compiler-is-now-in-rc*/}
1616

17-
Please see the [stable release blog post](/blog/2025/10/07/react-compiler-1) for details.
17+
詳細については[安定版リリース記事](/blog/2025/10/07/react-compiler-1)をご覧ください。
1818

1919
</Note>
2020

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@ GraphQL API からデータを取得する場合、以下の使用をお勧め
122122

123123
### アプリケーションパフォーマンスの向上 {/*improving-application-performance*/}
124124

125-
<<<<<<< HEAD
126125
あなたが選択したビルドツールは、シングルページアプリ (SPA) のみをサポートしています。このためサーバサイドレンダリング (SSR)、静的サイト生成 (SSG)、あるいは React Server Components (RSC) などの他の[レンダーパターン](https://www.patterns.dev/vanilla/rendering-patterns)は自分で実装する必要があります。最初はこれらの機能が必要でなくても、将来的には SSR、SSG、または RSC の恩恵を受けるルート(ページ)があるかもしれません。
127-
=======
128-
Since the build tool you select only supports single page apps (SPAs), you'll need to implement other [rendering patterns](https://www.patterns.dev/vanilla/rendering-patterns) like server-side rendering (SSR), static site generation (SSG), and/or React Server Components (RSC). Even if you don't need these features at first, in the future there may be some routes that would benefit SSR, SSG or RSC.
129-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
130126

131127
* **シングルページアプリ (SPA)** は、単一の HTML ページを読み込み、ユーザがアプリを操作した際にページを動的に更新します。SPA は始めやすいですが、初期読み込み時間が遅くなることがあります。SPA はほとんどのビルドツールにおけるデフォルトのアーキテクチャです。
132128

src/content/learn/escape-hatches.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,7 @@ React は、エフェクトの依存配列が正しく指定されているか
312312

313313
## イベントとエフェクトを切り離す {/*separating-events-from-effects*/}
314314

315-
<<<<<<< HEAD
316-
<Wip>
317-
318-
このセクションでは、まだ安定版の React でリリースされていない**実験的な API** について説明しています。
319-
320-
</Wip>
321-
322315
イベントハンドラは同じインタラクションを再度実行した場合のみ再実行されます。エフェクトはイベントハンドラとは異なり、props や state 変数のようなそれが読み取る値が前回のレンダー時の値と異なる場合に再同期を行います。また、ある値には反応して再実行するが、他の値には反応しないエフェクトなど、両方の動作をミックスさせたい場合もあります。
323-
=======
324-
Event handlers only re-run when you perform the same interaction again. Unlike event handlers, Effects re-synchronize if any of the values they read, like props or state, are different than during last render. Sometimes, you want a mix of both behaviors: an Effect that re-runs in response to some values but not others.
325-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
326316

327317
エフェクト内のすべてのコードは*リアクティブ*です。それが読み取るリアクティブな値が再レンダーにより変更された場合、再度実行されます。例えば、このエフェクトは `roomId``theme` のいずれかが変更された場合にチャットに再接続します。
328318

src/content/learn/manipulating-the-dom-with-refs.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,7 @@ li {
211211

212212
これを回避する方法のひとつは、親要素への単一の ref を取得し、[`querySelectorAll`](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll) のような DOM 操作メソッドを使って、個々の子ノードを「見つける」ことです。ただし、これは壊れやすく、DOM 構造が変更されると機能しなくなる可能性があります。
213213

214-
<<<<<<< HEAD
215-
別の解決策は、**`ref` 属性に関数を渡す**ことです。これは、[`ref` コールバック](/reference/react-dom/components/common#ref-callback) と呼ばれます。React は、ref を設定するタイミングで DOM ノードを引数にして ref コールバックを呼び出し、クリアするタイミングでは `null` を引数にして呼び出します。これにより、独自の配列や [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) を保持し、インデックスや ID のようなもので任意の ref にアクセスできるようになります。
216-
=======
217-
Another solution is to **pass a function to the `ref` attribute.** This is called a [`ref` callback.](/reference/react-dom/components/common#ref-callback) React will call your ref callback with the DOM node when it's time to set the ref, and call the cleanup function returned from the callback when it's time to clear it. This lets you maintain your own array or a [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), and access any ref by its index or some kind of ID.
218-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
214+
別の解決策は、**`ref` 属性に関数を渡す**ことです。これは、[`ref` コールバック](/reference/react-dom/components/common#ref-callback) と呼ばれます。React は、ref を設定するタイミングで DOM ノードを引数にして ref コールバックを呼び出し、クリアするタイミングではそのコールバックが返したクリーンアップ関数を呼び出します。これにより、独自の配列や [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) を保持し、インデックスや ID のようなもので任意の ref にアクセスできるようになります。
219215

220216
この例では、このアプローチを用いて、長いリストの任意のノードにスクロールする方法を示しています。
221217

src/content/learn/removing-effect-dependencies.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -609,17 +609,7 @@ function ChatRoom({ roomId }) {
609609
610610
### 変更に「反応」せず値を読み出したいだけか? {/*do-you-want-to-read-a-value-without-reacting-to-its-changes*/}
611611
612-
<<<<<<< HEAD
613-
<Wip>
614-
615-
このセクションでは、まだ安定版の React でリリースされていない**実験的な API** を説明しています。
616-
617-
</Wip>
618-
619612
`isMuted``true` でない場合に限り、ユーザが新しいメッセージを受信したときに音を再生したいとします。
620-
=======
621-
Suppose that you want to play a sound when the user receives a new message unless `isMuted` is `true`:
622-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
623613
624614
```js {3,10-12}
625615
function ChatRoom({ roomId }) {

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

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -837,17 +837,7 @@ export default function ChatRoom({ roomId }) {
837837
838838
### カスタムフックにイベントハンドラを渡す {/*passing-event-handlers-to-custom-hooks*/}
839839
840-
<<<<<<< HEAD
841-
<Wip>
842-
843-
このセクションでは、まだ安定版の React で**リリースされていない実験的な API** について説明しています。
844-
845-
</Wip>
846-
847840
`useChatRoom` がより多くのコンポーネントで使用されるようになると、コンポーネント側でその動作をカスタマイズしたくなってくるでしょう。例えば現在のところ、メッセージが届いたときの処理ロジックはフック内にハードコードされています。
848-
=======
849-
As you start using `useChatRoom` in more components, you might want to let components customize its behavior. For example, currently, the logic for what to do when a message arrives is hardcoded inside the Hook:
850-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
851841
852842
```js {9-11}
853843
export function useChatRoom({ serverUrl, roomId }) {
@@ -1423,10 +1413,7 @@ function SaveButton() {
14231413
14241414
#### 将来 React はデータフェッチのための組み込みソリューションを提供するか? {/*will-react-provide-any-built-in-solution-for-data-fetching*/}
14251415
1426-
<<<<<<< HEAD
1427-
まだ詳細は検討中ですが、将来的にはデータフェッチを以下のように書くことになるでしょう。
1428-
=======
1429-
Today, with the [`use`](/reference/react/use#streaming-data-from-server-to-client) API, data can be read in render by passing a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) to `use`:
1416+
現在では [`use`](/reference/react/use#streaming-data-from-server-to-client) API に[プロミス](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)を渡すことで、レンダー時にデータの読み込みが可能となっています。
14301417
14311418
```js {1,4,11}
14321419
import { use, Suspense } from "react";
@@ -1445,8 +1432,7 @@ export function MessageContainer({ messagePromise }) {
14451432
}
14461433
```
14471434
1448-
We're still working out the details, but we expect that in the future, you'll write data fetching like this:
1449-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
1435+
詳細はまだ検討中ですが、将来的にはデータフェッチを以下のように書けるようになるはずです。
14501436
14511437
```js {1,4,6}
14521438
import { use } from 'react';

src/content/learn/separating-events-from-effects.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -400,17 +400,7 @@ label { display: block; margin-top: 10px; }
400400
401401
### エフェクトイベントの宣言 {/*declaring-an-effect-event*/}
402402
403-
<<<<<<< HEAD
404-
<Wip>
405-
406-
このセクションでは、まだ安定版の React で**リリースされていない実験的な API** について説明しています。
407-
408-
</Wip>
409-
410-
[`useEffectEvent`](/reference/react/experimental_useEffectEvent) という特別なフックを使うことで、エフェクトからこの非リアクティブなロジックを分離することができます。
411-
=======
412-
Use a special Hook called [`useEffectEvent`](/reference/react/useEffectEvent) to extract this non-reactive logic out of your Effect:
413-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
403+
[`useEffectEvent`](/reference/react/useEffectEvent) という特別なフックを使うことで、エフェクトからこの非リアクティブなロジックを分離することができます。
414404
415405
```js {1,4-6}
416406
import { useEffect, useEffectEvent } from 'react';
@@ -582,17 +572,7 @@ label { display: block; margin-top: 10px; }
582572
583573
### エフェクトイベントで最新の props や state を読み取る {/*reading-latest-props-and-state-with-effect-events*/}
584574
585-
<<<<<<< HEAD
586-
<Wip>
587-
588-
このセクションでは、まだ安定版の React で**リリースされていない実験的な API** について説明しています。
589-
590-
</Wip>
591-
592575
依存値に関するリンタを抑制したくなるようなパターンの多くは、エフェクトイベントによって回避可能です。
593-
=======
594-
Effect Events let you fix many patterns where you might be tempted to suppress the dependency linter.
595-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
596576
597577
例えば、ページへの訪問をログに記録するエフェクトがあるとしましょう。
598578
@@ -733,11 +713,7 @@ function Page({ url }) {
733713
}
734714
```
735715
736-
<<<<<<< HEAD
737-
`useEffectEvent` が React の安定版に含まれるようになった後は、**決してリンタを抑制しない**ことをお勧めします。
738-
=======
739-
We recommend **never suppressing the linter**.
740-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
716+
**決してリンタを抑制しない**ことをお勧めします。
741717
742718
このルールを止めてしまうことの最大の欠点は、新たにコードにリアクティブな依存値を追加してそれにエフェクトが「反応する」必要がある場合でも、もはや React が警告を表示できなくなってしまうことです。先ほどの例でも、`url` を依存配列に追加し忘れずに済んだのは、そうするよう React が教えてくれていたからでしたね。リンタを無効化してしまうと、今後そのエフェクトを編集する際に、そのようなリマインダを受け取ることができなくなります。これはバグにつながります。
743719
@@ -874,17 +850,7 @@ body {
874850
875851
### エフェクトイベントに関する制限事項 {/*limitations-of-effect-events*/}
876852
877-
<<<<<<< HEAD
878-
<Wip>
879-
880-
このセクションでは、まだ安定版の React で**リリースされていない実験的な API** について説明しています。
881-
882-
</Wip>
883-
884853
エフェクトイベントは、使い方が非常に限定されています。
885-
=======
886-
Effect Events are very limited in how you can use them:
887-
>>>>>>> f8c81a0f4f8e454c850f0c854ad054b32313345c
888854
889855
* **エフェクトの内部からしか呼び出すことができない**。
890856
* **他のコンポーネントやフックに渡してはいけない**。

0 commit comments

Comments
 (0)