Skip to content

Commit 6121416

Browse files
committed
Resolve conflicts
1 parent 5888467 commit 6121416

13 files changed

Lines changed: 19 additions & 96 deletions

src/content/blog/2024/04/25/react-19-upgrade-guide.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,7 @@ npm install react-shallow-renderer --save-dev
353353

354354
##### シャローレンダリングの再考を {/*please-reconsider-shallow-rendering*/}
355355

356-
<<<<<<< HEAD
357-
シャローレンダリングは React の内部構造に依存しており、将来のアップグレードの妨げとなる可能性があります。テストを [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/)[@testing-library/react-native](https://callstack.github.io/react-native-testing-library/docs/getting-started) に移行することをお勧めします。
358-
=======
359-
Shallow rendering depends on React internals and can block you from future upgrades. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro).
360-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
356+
シャローレンダリングは React の内部構造に依存しており、将来のアップグレードの妨げとなる可能性があります。テストを [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/)[@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) に移行することをお勧めします。
361357

362358
</Note>
363359

@@ -528,11 +524,7 @@ Accessing element.ref is no longer supported. ref is now a regular prop. It will
528524

529525
このテストレンダラは、[React Testing Library](https://testing-library.com) のようなより実用的なテスト戦略が利用可能になる前に作成されたものです。現在では、モダンなテストライブラリの使用が推奨されます。
530526

531-
<<<<<<< HEAD
532-
React 19 では、`react-test-renderer` は非推奨警告をログに記録するようになり、また並行レンダーに切り替わりました。モダンかつよりよくサポートされたテスト体験のためには、テストを [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) または [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/docs/getting-started) に移行することを推奨します。
533-
=======
534-
In React 19, `react-test-renderer` logs a deprecation warning, and has switched to concurrent rendering. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) for a modern and well supported testing experience.
535-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
527+
React 19 では、`react-test-renderer` は非推奨警告をログに記録するようになり、また並行レンダーに切り替わりました。モダンかつよりよくサポートされたテスト体験のためには、テストを [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) または [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) に移行することを推奨します。
536528

537529
## 注目すべき変更点 {/*notable-changes*/}
538530

src/content/community/acknowledgements.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ title: 謝辞
5959

6060
このリストは全員を網羅したものではありません。
6161

62-
<<<<<<< HEAD
63-
特に、長年にわたる指導とサポートをしていただいた [Tom Occhino](https://github.com/tomocchino)[Adam Wolff](https://github.com/wolffiex) に感謝いたします。[React を他の言語に翻訳](https://translations.reactjs.org/)してくださったボランティアの皆様にも感謝いたします。
64-
=======
65-
We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino) and [Adam Wolff](https://github.com/wolffiex) for their guidance and support over the years. We are also thankful to all the volunteers who [translated React into other languages.](https://translations.react.dev/)
66-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
62+
特に、長年にわたる指導とサポートをしていただいた [Tom Occhino](https://github.com/tomocchino)[Adam Wolff](https://github.com/wolffiex) に感謝いたします。[React を他の言語に翻訳](https://translations.react.dev/)してくださったボランティアの皆様にも感謝いたします。
6763

6864
## 追加の謝辞 {/*additional-thanks*/}
6965

src/content/learn/synchronizing-with-effects.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,11 +627,7 @@ React は、開発中に意図的にコンポーネントを再マウントし
627627
628628
### React 以外のウィジェットを制御する {/*controlling-non-react-widgets*/}
629629
630-
<<<<<<< HEAD
631630
時に、React で書かれていない UI ウィジェットを追加したい場合があります。例えば、ページに地図コンポーネントを追加しようとしているとします。`setZoomLevel()` メソッドがあり、React のコード内の `zoomLevel` という state 変数と同期させたいとします。エフェクトは次のようになります。
632-
=======
633-
Sometimes you need to add UI widgets that aren't written in React. For example, let's say you're adding a map component to your page. It has a `setZoomLevel()` method, and you'd like to keep the zoom level in sync with a `zoomLevel` state variable in your React code. Your Effect would look similar to this:
634-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
635631
636632
```js
637633
useEffect(() => {

src/content/learn/thinking-in-react.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,11 @@ props と state は異なるものですが、それらは協調して働きま
265265

266266
それではこの戦術をサンプルアプリにも適用してみましょう:
267267

268-
<<<<<<< HEAD
269268
1. **state を使用するコンポーネントの特定:**
270269
* `ProductTable` は、これらの state(検索テキストとチェックボックスの値)に基づいて製品リストをフィルタリングする必要があります。
271270
* `SearchBar` は、これらの state(検索テキストとチェックボックスの値)を表示する必要があります。
272-
1. **共通の親を見つける:** 両方のコンポーネントに共通の最初の親コンポーネントは `FilterableProductTable` です。
273-
2. **state がどこにあるべきかを決定する:** フィルタ文字列とチェック状態の値を `FilterableProductTable` に保持することにします。
274-
=======
275-
1. **Identify components that use state:**
276-
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
277-
* `SearchBar` needs to display that state (search text and checkbox value).
278-
2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
279-
3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
280-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
271+
2. **共通の親を見つける:** 両方のコンポーネントに共通の最初の親コンポーネントは `FilterableProductTable` です。
272+
3. **state がどこにあるべきかを決定する:** フィルタ文字列とチェック状態の値を `FilterableProductTable` に保持することにします。
281273

282274
したがって、state の値は `FilterableProductTable` にあることになります。
283275

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,11 +1133,7 @@ export default function Board() {
11331133
11341134
<Note>
11351135
1136-
<<<<<<< HEAD
11371136
JavaScript は[クロージャ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures)をサポートしているため、内側の関数(例:`handleClick`)は外側の関数(例:`Board`)で定義されている変数や関数にアクセスできます。`handleClick` 関数は、state である `squares` を読み取ったり、`setSquares` メソッドを呼び出したりできます。これらは両方とも `Board` 関数の内部で定義されているためです。
1138-
=======
1139-
JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in an outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
1140-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
11411137
11421138
</Note>
11431139

src/content/learn/updating-objects-in-state.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,7 @@ input { margin-left: 5px; margin-bottom: 5px; }
379379

380380
#### 複数のフィールドに単一のイベントハンドラを使う {/*using-a-single-event-handler-for-multiple-fields*/}
381381

382-
<<<<<<< HEAD
383382
オブジェクト定義内で `[``]` 括弧を使って、動的な名前のプロパティを指定することもできます。以下は上記と同じ例ですが、3 つの異なるイベントハンドラの代わりに 1 つのイベントハンドラを使用しています。
384-
=======
385-
You can also use the `[` and `]` braces inside your object definition to specify a property with a dynamic name. Here is the same example, but with a single event handler instead of three different ones:
386-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
387383

388384
<Sandpack>
389385

src/content/learn/you-might-not-need-an-effect.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,7 @@ function Game() {
408408
409409
このコードには 2 つの問題があります。
410410
411-
<<<<<<< HEAD
412411
1 つ目の問題は、非常に効率が悪いことです。コンポーネント(およびその子)は、連鎖内の各 `set` コールの間で毎回再レンダーする必要があります。上記の例では、最悪の場合、下位のツリーに 3 回の不要な再レンダー(`setCard` → レンダー → `setGoldCardCount` → レンダー → `setRound` → レンダー → `setIsGameOver` → レンダー)が発生することになります。
413-
=======
414-
The first problem is that it is very inefficient: the component (and its children) have to re-render between each `set` call in the chain. In the example above, in the worst case (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) there are three unnecessary re-renders of the tree below.
415-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
416412
417413
2 つ目の問題は、たとえこれが遅くなかったとしても、コードが発展するにつれ、書いた「チェイン」が新しい要件に適合しないケースが出てくるということです。例えばゲームの手順を遡る機能を追加しているとしましょう。このためには、各 state 変数を過去のある時点の値に再セットしていくことになります。しかし過去の値から `card` の state をセットした時点で再びエフェクトの連鎖処理がトリガされ、表示されるデータが変更されてしまいます。このようなコードは、硬直的で壊れやすいものです。
418414

src/content/reference/react-dom/preinitModule.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,12 @@ function AppRoot() {
5151

5252
#### 引数 {/*parameters*/}
5353

54-
<<<<<<< HEAD
5554
* `href`: 文字列。ダウンロードして実行したいモジュールの URL。
5655
* `options`: オブジェクト。以下のプロパティを含みます。
5756
* `as`: 必須の文字列。`'script'` である必要があります。
5857
* `crossOrigin`: 文字列。使用する [CORS ポリシー](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin)。可能な値は `anonymous``use-credentials` です。
5958
* `integrity`: 文字列。[真正性を検証する](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)ために使用するリソースの暗号化ハッシュ。
6059
* `nonce`: 文字列。厳格なコンテンツセキュリティポリシーを使用する際に[リソースを許可するための暗号化 nonce](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce)
61-
=======
62-
* `href`: a string. The URL of the module you want to download and execute.
63-
* `options`: an object. It contains the following properties:
64-
* `as`: a required string. It must be `'script'`.
65-
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`.
66-
* `integrity`: a string. A cryptographic hash of the module, to [verify its authenticity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
67-
* `nonce`: a string. A cryptographic [nonce to allow the module](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce) when using a strict Content Security Policy.
68-
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
6960

7061
#### 返り値 {/*returns*/}
7162

0 commit comments

Comments
 (0)