Skip to content

Commit 2937f62

Browse files
authored
Sync with react.dev @ f9e2c13 (#1352)
This PR was automatically generated. Merge changes from [react.dev](https://github.com/reactjs/react.dev/commits/main) at f9e2c13 The following files have conflicts and may need new translations: * [x] [src/content/reference/react/Component.md](/reactjs/react.dev/commits/main/src/content/reference/react/Component.md) Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch. ## DO NOT SQUASH MERGE THIS PULL REQUEST! Doing so will "erase" the commits from main and cause them to show up as conflicts the next time we merge.
2 parents f4f39a5 + 6356c12 commit 2937f62

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,16 @@ button { margin-left: 10px; }
12711271
12721272
기본적으로 애플리케이션이 렌더링 도중 에러를 발생시키면 React는 화면에서 해당 UI를 제거합니다. 이를 방지하기 위해 UI의 일부를 *Error Boundary*로 감싸면 됩니다. Error Boundary는 에러가 발생한 부분 대신 오류 메시지와 같은 Fallback UI를 표시할 수 있는 특수 컴포넌트입니다.
12731273
1274+
<Note>
1275+
Error boundaries do not catch errors for:
1276+
1277+
- Event handlers [(learn more)](/learn/responding-to-events)
1278+
- [Server side rendering](/reference/react-dom/server)
1279+
- Errors thrown in the error boundary itself (rather than its children)
1280+
- 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)
1281+
1282+
</Note>
1283+
12741284
Error Boundary 컴포넌트를 구현하려면 오류에 대한 응답으로 State를 업데이트하고 사용자에게 오류 메시지를 표시할 수 있는 [`static getDerivedStateFromError`](#static-getderivedstatefromerror)를 제공해야 합니다. 또한 선택적으로 [`componentDidCatch`](#componentdidcatch)를 구현하여 분석 서비스에 오류를 기록하는 등의 추가 로직을 추가할 수도 있습니다.
12751285
12761286
With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.

src/sidebarBlog.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
"date": "October 7, 2025",
5454
"path": "/blog/2025/10/07/introducing-the-react-foundation"
5555
},
56+
{
57+
"title": "React 19.2",
58+
"titleForHomepage": "React 19.2",
59+
"icon": "blog",
60+
"date": "October 1, 2025",
61+
"path": "/blog/2025/10/01/react-19-2"
62+
},
5663
{
5764
"title": "React Labs: View Transitions, Activity, and more",
5865
"titleForHomepage": "View Transitions and Activity",

0 commit comments

Comments
 (0)