Skip to content

Commit 4d9ebf7

Browse files
merging all conflicts
2 parents 698a0ba + f9e2c13 commit 4d9ebf7

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed

next.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ const nextConfig = {
3636
// Don't bundle the shim unnecessarily.
3737
config.resolve.alias['use-sync-external-store/shim'] = 'react';
3838

39+
// ESLint depends on the CommonJS version of esquery,
40+
// but Webpack loads the ESM version by default. This
41+
// alias ensures the correct version is used.
42+
//
43+
// More info:
44+
// https://github.com/reactjs/react.dev/pull/8115
45+
config.resolve.alias['esquery'] = 'esquery/dist/esquery.min.js';
46+
3947
const {IgnorePlugin, NormalModuleReplacementPlugin} = require('webpack');
4048
config.plugins.push(
4149
new NormalModuleReplacementPlugin(

src/components/MDX/Sandpack/runESLint.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ const getCodeMirrorPosition = (
2121

2222
const linter = new Linter();
2323

24-
// HACK! Eslint requires 'esquery' using `require`, but there's no commonjs interop.
25-
// because of this it tries to run `esquery.parse()`, while there's only `esquery.default.parse()`.
26-
// This hack places the functions in the right place.
27-
const esquery = require('esquery');
28-
esquery.parse = esquery.default?.parse;
29-
esquery.matches = esquery.default?.matches;
30-
3124
const reactRules = require('eslint-plugin-react-hooks').rules;
3225
linter.defineRules({
3326
'react-hooks/rules-of-hooks': reactRules['rules-of-hooks'],

src/content/reference/react/Component.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,21 @@ button { margin-left: 10px; }
12711271

12721272
デフォルトでは、アプリケーションがレンダー中にエラーをスローすると、React はその UI を画面から削除します。これを防ぐために、UI*エラーバウンダリ*にラップすることができます。エラーバウンダリは、クラッシュした部位の代わりに、例えばエラーメッセージなどのフォールバック UI を表示するための、特別なコンポーネントです。
12731273

1274+
<<<<<<< HEAD
12741275
エラーバウンダリコンポーネントを実装するためには、エラーに反応して state を更新し、ユーザにエラーメッセージを表示するための [`static getDerivedStateFromError`](#static-getderivedstatefromerror) を提供する必要があります。またオプションで、例えばエラーを分析サービスに記録するなどの追加のロジックを追加するために [`componentDidCatch`](#componentdidcatch) を実装することもできます。
1276+
=======
1277+
<Note>
1278+
Error boundaries do not catch errors for:
1279+
1280+
- Event handlers [(learn more)](/learn/responding-to-events)
1281+
- [Server side rendering](/reference/react-dom/server)
1282+
- Errors thrown in the error boundary itself (rather than its children)
1283+
- Asynchronous code (e.g. `setTimeout` or `requestAnimationFrame` callbacks); an exception is the usage of the [`startTransition`](/reference/react/useTransition#starttransition) function returned by the [`useTransition`](/reference/react/useTransition) Hook. Errors thrown inside the transition function are caught by error boundaries [(learn more)](/reference/react/useTransition#displaying-an-error-to-users-with-error-boundary)
1284+
1285+
</Note>
1286+
1287+
To implement an Error Boundary component, you need to provide [`static getDerivedStateFromError`](#static-getderivedstatefromerror) which lets you update state in response to an error and display an error message to the user. You can also optionally implement [`componentDidCatch`](#componentdidcatch) to add some extra logic, for example, to log the error to an analytics service.
1288+
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
12751289

12761290
[`captureOwnerStack`](/reference/react/captureOwnerStack) を使うことで開発中にオーナーのスタックトレースを含めることが可能です。
12771291

src/sidebarBlog.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,20 @@
3333
"path": "/blog/2025/10/07/introducing-the-react-foundation"
3434
},
3535
{
36+
<<<<<<< HEAD
3637
"title": "React Labs: ビュー遷移、Activity、その他もろもろ",
3738
"titleForHomepage": "ビュー遷移と Activity",
39+
=======
40+
"title": "React 19.2",
41+
"titleForHomepage": "React 19.2",
42+
"icon": "blog",
43+
"date": "October 1, 2025",
44+
"path": "/blog/2025/10/01/react-19-2"
45+
},
46+
{
47+
"title": "React Labs: View Transitions, Activity, and more",
48+
"titleForHomepage": "View Transitions and Activity",
49+
>>>>>>> f9e2c1396769bb5da87db60f9ff03683d18711e2
3850
"icon": "blog",
3951
"date": "April 23, 2025",
4052
"path": "/blog/2025/04/23/react-labs-view-transitions-activity-and-more"

0 commit comments

Comments
 (0)