diff --git a/src/content/blog/2024/04/25/react-19-upgrade-guide.md b/src/content/blog/2024/04/25/react-19-upgrade-guide.md
index bbbc2fe88..9aabf178f 100644
--- a/src/content/blog/2024/04/25/react-19-upgrade-guide.md
+++ b/src/content/blog/2024/04/25/react-19-upgrade-guide.md
@@ -1,8 +1,8 @@
---
-title: "React 19 Upgrade Guide"
+title: "React 19 업그레이드 가이드"
author: Ricky Hanlon
date: 2024/04/25
-description: The improvements added to React 19 require some breaking changes, but we've worked to make the upgrade as smooth as possible and we don't expect the changes to impact most apps. In this post, we will guide you through the steps for upgrading apps and libraries to React 19.
+description: React 19에 추가된 개선 사항들로 인해 일부 파괴적 변경(breaking changes)이 필요하지만, 저희는 가능한 한 업그레이드가 원활하게 이루어지도록 노력했으며 대부분의 앱에 큰 영향을 미치지 않을 것으로 예상합니다. 이 게시물에서는 앱과 라이브러리를 React 19로 업그레이드하는 단계를 안내해 드리겠습니다.
---
April 25, 2024 by [Ricky Hanlon](https://twitter.com/rickhanlonii)
@@ -12,44 +12,44 @@ April 25, 2024 by [Ricky Hanlon](https://twitter.com/rickhanlonii)
-The improvements added to React 19 require some breaking changes, but we've worked to make the upgrade as smooth as possible, and we don't expect the changes to impact most apps.
+React 19에 추가된 개선 사항들로 인해 일부 파괴적 변경(breaking changes)이 필요하지만, 저희는 가능한 한 업그레이드가 원활하게 이루어지도록 노력했으며 대부분의 앱에 큰 영향을 미치지 않을 것으로 예상합니다. 이 게시물에서는 앱과 라이브러리를 React 19로 업그레이드하는 단계를 안내해 드리겠습니다.
-#### React 18.3 has also been published {/*react-18-3*/}
+#### React 18.3 또한 출시되었습니다. {/*react-18-3*/}
-To help make the upgrade to React 19 easier, we've published a `react@18.3` release that is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19.
+React 19로의 업그레이드를 더 쉽게 돕기 위해, 저희는 **react@18.3**을 출시했습니다. 이 버전은 18.2와 동일하지만, 더 이상 사용되지 않는 API 및 React 19에 필요한 변경 사항에 대한 경고를 추가했습니다.
-We recommend upgrading to React 18.3 first to help identify any issues before upgrading to React 19.
+React 19로 업그레이드하기 전에 먼저 React 18.3으로 업데이트하여 잠재적인 문제를 미리 파악하는 것을 권장합니다.
-For a list of changes in 18.3 see the [Release Notes](https://github.com/facebook/react/blob/main/CHANGELOG.md#1830-april-25-2024).
+18.3 버전의 변경 사항 목록은 [릴리스 노트](https://github.com/facebook/react/blob/main/CHANGELOG.md#1830-april-25-2024)에서 확인하실 수 있습니다.
-In this post, we will guide you through the steps for upgrading to React 19:
+이 게시물에서는 React 19로 업그레이드하는 단계를 안내해 드립니다:
-- [Installing](#installing)
-- [Codemods](#codemods)
-- [Breaking changes](#breaking-changes)
-- [New deprecations](#new-deprecations)
-- [Notable changes](#notable-changes)
-- [TypeScript changes](#typescript-changes)
-- [Changelog](#changelog)
+- [설치](#installing)
+- [코드모드](#codemods)
+- [주요 변경 사항](#breaking-changes)
+- [새로 사용 중단된 사항](#new-deprecations)
+- [주목할 만한 변경 사항](#notable-changes)
+- [TypeScript 변경 사항](#typescript-changes)
+- [변경 로그](#changelog)
-If you'd like to help us test React 19, follow the steps in this upgrade guide and [report any issues](https://github.com/facebook/react/issues/new?assignees=&labels=React+19&projects=&template=19.md&title=%5BReact+19%5D) you encounter. For a list of new features added to React 19, see the [React 19 release post](/blog/2024/12/05/react-19).
+React 19을 테스트해보고 싶으시다면, 이 업그레이드 가이드에 나와 있는 단계를 따라주시고, 문제가 발생하면 [이슈를 제보해주세요](https://github.com/facebook/react/issues/new?assignees=&labels=React+19&projects=&template=19.md&title=%5BReact+19%5D). React 19에 추가된 새로운 기능 목록은 [React 19 릴리스 게시글](/blog/2024/12/05/react-19)에서 확인하실 수 있습니다.
---
-## Installing {/*installing*/}
+## 설치 {/*installing*/}
-#### New JSX Transform is now required {/*new-jsx-transform-is-now-required*/}
+#### 이제 새로운 JSX 변환 방식이 필수입니다. {/*new-jsx-transform-is-now-required*/}
-We introduced a [new JSX transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) in 2020 to improve bundle size and use JSX without importing React. In React 19, we're adding additional improvements like using ref as a prop and JSX speed improvements that require the new transform.
+우리는 2020년에 [새로운 JSX 변환](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html)을 도입하여 번들 크기를 줄이고 React를 import하지 않고도 JSX를 사용할 수 있도록 했습니다. React 19에서는 ref를 prop으로 사용할 수 있는 기능이나 JSX 성능 향상과 같은 추가적인 개선 사항이 도입되며, 이러한 기능들은 새로운 변환(new transform)을 필요로 합니다.
-If the new transform is not enabled, you will see this warning:
+새로운 변환이 활성화되지 않은 경우, 다음과 같은 경고가 표시됩니다:
@@ -62,79 +62,77 @@ Your app (or one of its dependencies) is using an outdated JSX transform. Update
-We expect most apps will not be affected since the transform is enabled in most environments already. For manual instructions on how to upgrade, please see the [announcement post](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html).
+대부분의 환경에서는 이미 새로운 변환이 활성화되어 있기 때문에 대부분의 앱은 영향을 받지 않을 것으로 예상됩니다. 수동으로 업그레이드하는 방법에 대한 안내는 [공지 게시글](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html)을 참조해주세요.
-To install the latest version of React and React DOM:
-
+최신 버전의 React 및 React DOM을 설치하려면:
```bash
npm install --save-exact react@^19.0.0 react-dom@^19.0.0
```
-Or, if you're using Yarn:
-
+또는 Yarn을 사용하는 경우:
```bash
yarn add --exact react@^19.0.0 react-dom@^19.0.0
```
-If you're using TypeScript, you also need to update the types.
+TypeScript를 사용하는 경우, 타입 정의도 함께 업데이트해야 합니다.
```bash
npm install --save-exact @types/react@^19.0.0 @types/react-dom@^19.0.0
```
-Or, if you're using Yarn:
+또는 Yarn을 사용하는 경우:
```bash
yarn add --exact @types/react@^19.0.0 @types/react-dom@^19.0.0
```
-We're also including a codemod for the most common replacements. See [TypeScript changes](#typescript-changes) below.
+가장 일반적인 변경 사항들을 위한 codemod도 포함되어 있습니다. 아래의 [TypeScript 변경 사항](#typescript-changes)을 참고하세요.
-## Codemods {/*codemods*/}
+## 코드모드 {/*codemods*/}
-To help with the upgrade, we've worked with the team at [codemod.com](https://codemod.com) to publish codemods that will automatically update your code to many of the new APIs and patterns in React 19.
+업그레이드를 돕기 위해, 우리는 [codemod.com](https://codemod.com) 팀과 협력하여 React 19의 새로운 API와 패턴들로 코드를 자동으로 업데이트해주는 codemod들을 공개했습니다.
-All codemods are available in the [`react-codemod` repo](https://github.com/reactjs/react-codemod) and the Codemod team have joined in helping maintain the codemods. To run these codemods, we recommend using the `codemod` command instead of the `react-codemod` because it runs faster, handles more complex code migrations, and provides better support for TypeScript.
+모든 codemod는 [`react-codemod` 저장소](https://github.com/reactjs/react-codemod) 에 있으며, Codemod 팀도 이 codemod들을 유지보수하는 데 함께하고 있습니다. 이러한 codemod들을 실행할 때는`eact-codemod` 보다 `codemod` 명령어를 사용하는 것을 권장합니다. codemod는 더 빠르게 실행되며, 더 복잡한 코드 마이그레이션을 처리하고, TypeScript에 대한 더 나은 지원을 제공합니다.
-#### Run all React 19 codemods {/*run-all-react-19-codemods*/}
+#### React 19 codemod 전체 실행 {/*run-all-react-19-codemods*/}
-Run all codemods listed in this guide with the React 19 `codemod` recipe:
+이 가이드에 나열된 모든 codemod를 React 19의 `codemod` 레시피를 통해 한 번에 실행하려면::
```bash
npx codemod@latest react/19/migration-recipe
```
-This will run the following codemods from `react-codemod`:
+이 명령어는 `react-codemod`의 다음 codemod들을 실행합니다:
- [`replace-reactdom-render`](https://github.com/reactjs/react-codemod?tab=readme-ov-file#replace-reactdom-render)
- [`replace-string-ref`](https://github.com/reactjs/react-codemod?tab=readme-ov-file#replace-string-ref)
- [`replace-act-import`](https://github.com/reactjs/react-codemod?tab=readme-ov-file#replace-act-import)
- [`replace-use-form-state`](https://github.com/reactjs/react-codemod?tab=readme-ov-file#replace-use-form-state)
- [`prop-types-typescript`](https://github.com/reactjs/react-codemod#react-proptypes-to-prop-types)
-This does not include the TypeScript changes. See [TypeScript changes](#typescript-changes) below.
+이 명령어는 TypeScript 변경 사항은 포함하지 않습니다. 아래의 [TypeScript changes](#typescript-changes) 을 참고하세요.
-Changes that include a codemod include the command below.
+Codemod이 포함된 변경 사항에는 아래와 같이 명령어가 함께 제공됩니다.
-For a list of all available codemods, see the [`react-codemod` repo](https://github.com/reactjs/react-codemod).
+사용 가능한 모든 codemod 목록은 [`react-codemod` 저장소](https://github.com/reactjs/react-codemod)를 참고하세요.
-## Breaking changes {/*breaking-changes*/}
+## 주요 변경사항 {/*breaking-changes*/}
-### Errors in render are not re-thrown {/*errors-in-render-are-not-re-thrown*/}
+### 렌더 중 발생한 오류는 re-throw 하지 않음{/*errors-in-render-are-not-re-thrown*/}
-In previous versions of React, errors thrown during render were caught and rethrown. In DEV, we would also log to `console.error`, resulting in duplicate error logs.
+이전 버전의 React에서는 렌더링 중 발생한 오류를 잡아서 다시 throw 했습니다. DEV 환경에서는 `console.error`로도 로그를 출력하여 오류 로그가 중복되는 문제가 있었습니다.
-In React 19, we've [improved how errors are handled](/blog/2024/04/25/react-19#error-handling) to reduce duplication by not re-throwing:
+React 19에서는 [오류 처리 방식이 개선되었습니다.](/blog/2024/04/25/react-19#error-handling) 더 이상 오류를 re-throw 하지 않아 중복 로그가 줄어듭니다:
-- **Uncaught Errors**: Errors that are not caught by an Error Boundary are reported to `window.reportError`.
-- **Caught Errors**: Errors that are caught by an Error Boundary are reported to `console.error`.
+- **처리되지 않은 오류**: Error Boundary에서 잡히지 않은 오류는 `window.reportError`로 보고됩니다.
+- **처리된 오류**: Error Boundary에서 잡힌 오류는 `console.error`로 보고됩니다.
-This change should not impact most apps, but if your production error reporting relies on errors being re-thrown, you may need to update your error handling. To support this, we've added new methods to `createRoot` and `hydrateRoot` for custom error handling:
+이 변경은 대부분의 앱에 영향을 주지 않지만, 프로덕션 오류 리포팅이 오류의 재-throw에 의존하고 있다면, 오류 처리 방식을 업데이트해야 할 수 있습니다. 이를 지원하기 위해 `createRoot` 및 `hydrateRoot` 에 사용자 정의 오류 처리를 위한 새로운 메서드가 추가되었습니다:
```js [[1, 2, "onUncaughtError"], [2, 5, "onCaughtError"]]
const root = createRoot(container, {
@@ -147,20 +145,20 @@ const root = createRoot(container, {
});
```
-For more info, see the docs for [`createRoot`](https://react.dev/reference/react-dom/client/createRoot) and [`hydrateRoot`](https://react.dev/reference/react-dom/client/hydrateRoot).
+자세한 내용은 [`createRoot`](https://react.dev/reference/react-dom/client/createRoot) 및 [`hydrateRoot`](https://react.dev/reference/react-dom/client/hydrateRoot) 문서를 참고하세요.
-### Removed deprecated React APIs {/*removed-deprecated-react-apis*/}
+### React의 더 이상 사용되지 않는 API 제거 {/*removed-deprecated-react-apis*/}
-#### Removed: `propTypes` and `defaultProps` for functions {/*removed-proptypes-and-defaultprops*/}
-`PropTypes` were deprecated in [April 2017 (v15.5.0)](https://legacy.reactjs.org/blog/2017/04/07/react-v15.5.0.html#new-deprecation-warnings).
+#### 제거됨: 함수형 컴포넌트에서의 `propTypes` 및 `defaultProps` {/*removed-proptypes-and-defaultprops*/}
+`PropTypes`는 [2017년 4월 (v15.5.0)](https://legacy.reactjs.org/blog/2017/04/07/react-v15.5.0.html#new-deprecation-warnings) 부터 더 이상 권장하지 않습니다.
-In React 19, we're removing the `propType` checks from the React package, and using them will be silently ignored. If you're using `propTypes`, we recommend migrating to TypeScript or another type-checking solution.
+React 19에서는 `propType` 검사 기능이 React 패키지에서 제거되며, 사용하더라도 아무 동작도 하지 않습니다. `propTypes`를 사용 중이라면 TypeScript나 다른 타입 검사 도구로 마이그레이션하는 것을 권장합니다.
-We're also removing `defaultProps` from function components in place of ES6 default parameters. Class components will continue to support `defaultProps` since there is no ES6 alternative.
+또한, 함수형 컴포넌트에서는 `defaultProps` 가 제거되며, 대신 **ES6의 기본 매개변수(default parameters)**를 사용해야 합니다. 클래스형 컴포넌트에서는 `defaultProps` 가 여전히 지원됩니다 (ES6 대안이 없기 때문입니다).
```js
-// Before
+// 변경 전
import PropTypes from 'prop-types';
function Heading({text}) {
@@ -174,7 +172,7 @@ Heading.defaultProps = {
};
```
```ts
-// After
+// 변경 후
interface Props {
text?: string;
}
@@ -185,7 +183,7 @@ function Heading({text = 'Hello, world!'}: Props) {
-Codemod `propTypes` to TypeScript with:
+Codemod을 사용해 `propTypes` 를 TypeScript로 변환하려면 다음 명령어를 실행하세요:
```bash
npx codemod@latest react/prop-types-typescript
@@ -193,16 +191,16 @@ npx codemod@latest react/prop-types-typescript
-#### Removed: Legacy Context using `contextTypes` and `getChildContext` {/*removed-removing-legacy-context*/}
+#### 제거됨: `contextTypes` 와 `getChildContext`를 사용하는 레거시 컨텍스트 {/*removed-removing-legacy-context*/}
-Legacy Context was deprecated in [October 2018 (v16.6.0)](https://legacy.reactjs.org/blog/2018/10/23/react-v-16-6.html).
+레거시 컨텍스트는 [2018년 10월 (v16.6.0)](https://legacy.reactjs.org/blog/2018/10/23/react-v-16-6.html)부터 더 이상 권장되지 않습니다.
-Legacy Context was only available in class components using the APIs `contextTypes` and `getChildContext`, and was replaced with `contextType` due to subtle bugs that were easy to miss. In React 19, we're removing Legacy Context to make React slightly smaller and faster.
+레거시 컨텍스트는 클래스형 컴포넌트에서 `contextTypes` 와 `getChildContext` API를 통해 사용 가능했지만, 미묘한 버그들로 인해 `contextType` API로 대체되었습니다. React 19에서는 React의 크기를 줄이고 성능을 향상시키기 위해 레거시 컨텍스트가 제거됩니다.
-If you're still using Legacy Context in class components, you'll need to migrate to the new `contextType` API:
+아직도 클래스형 컴포넌트에서 레거시 컨텍스트를 사용하고 있다면, 새로운 `contextType`API로 마이그레이션해야 합니다:
```js {5-11,19-21}
-// Before
+// 변경 전
import PropTypes from 'prop-types';
class Parent extends React.Component {
@@ -231,7 +229,7 @@ class Child extends React.Component {
```
```js {2,7,9,15}
-// After
+// 변경 후
const FooContext = React.createContext();
class Parent extends React.Component {
@@ -253,15 +251,15 @@ class Child extends React.Component {
}
```
-#### Removed: string refs {/*removed-string-refs*/}
-String refs were deprecated in [March, 2018 (v16.3.0)](https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html).
+#### 제거됨: 문자열 refs {/*removed-string-refs*/}
+문자열 refs는 [2018년 3월 (v16.3.0)](https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html)부터 더이상 권장되지 않습니다.
-Class components supported string refs before being replaced by ref callbacks due to [multiple downsides](https://github.com/facebook/react/issues/1373). In React 19, we're removing string refs to make React simpler and easier to understand.
+클래스형 컴포넌트에서는 문자열 refs를 사용할 수 있었지만, [여러 단점들](https://github.com/facebook/react/issues/1373)로 인해 ref 콜백 방식으로 대체되었습니다. React 19에서는 React를 더 간단하고 이해하기 쉽게 만들기 위해 문자열 refs가 제거됩니다.
-If you're still using string refs in class components, you'll need to migrate to ref callbacks:
+클래스형 컴포넌트에서 아직 문자열 refs를 사용하고 있다면, ref 콜백으로 마이그레이션해야 합니다:
```js {4,8}
-// Before
+// 변경 전
class MyComponent extends React.Component {
componentDidMount() {
this.refs.input.focus();
@@ -274,7 +272,7 @@ class MyComponent extends React.Component {
```
```js {4,8}
-// After
+// 변경 후
class MyComponent extends React.Component {
componentDidMount() {
this.input.focus();
@@ -288,7 +286,7 @@ class MyComponent extends React.Component {
-Codemod string refs with `ref` callbacks:
+Codemod을 사용해 문자열 refs를 `ref` 콜백으로 변환하려면:
```bash
npx codemod@latest react/19/replace-string-ref
@@ -296,45 +294,45 @@ npx codemod@latest react/19/replace-string-ref
-#### Removed: Module pattern factories {/*removed-module-pattern-factories*/}
-Module pattern factories were deprecated in [August 2019 (v16.9.0)](https://legacy.reactjs.org/blog/2019/08/08/react-v16.9.0.html#deprecating-module-pattern-factories).
+#### 제거됨: 모듈 패턴 팩토리 {/*removed-module-pattern-factories*/}
+모듈 패턴 팩토리는 [2019년 8월 (v16.9.0)](https://legacy.reactjs.org/blog/2019/08/08/react-v16.9.0.html#deprecating-module-pattern-factories)부터 더이상 권장되지 않습니다.
-This pattern was rarely used and supporting it causes React to be slightly larger and slower than necessary. In React 19, we're removing support for module pattern factories, and you'll need to migrate to regular functions:
+이 패턴은 거의 사용되지 않았으며, 이를 지원하는 것은 React를 불필요하게 더 크고 느리게 만들었습니다. React 19에서는 모듈 패턴 팩토리에 대한 지원이 제거되며, 일반 함수로 마이그레이션해야 합니다:
```js
-// Before
+// 변경 전
function FactoryComponent() {
return { render() { return
; } }
}
```
```js
-// After
+// 변경 후
function FactoryComponent() {
return ;
}
```
-#### Removed: `React.createFactory` {/*removed-createfactory*/}
-`createFactory` was deprecated in [February 2020 (v16.13.0)](https://legacy.reactjs.org/blog/2020/02/26/react-v16.13.0.html#deprecating-createfactory).
+#### 제거됨: `React.createFactory` {/*removed-createfactory*/}
+`createFactory` 는 [2020년 2월 (v16.13.0)](https://legacy.reactjs.org/blog/2020/02/26/react-v16.13.0.html#deprecating-createfactory)부터 더이상 권장되지 않습니다.
-Using `createFactory` was common before broad support for JSX, but it's rarely used today and can be replaced with JSX. In React 19, we're removing `createFactory` and you'll need to migrate to JSX:
+`createFactory` 는 JSX가 널리 사용되기 전에는 일반적이었지만, 오늘날에는 거의 사용되지 않으며 JSX로 쉽게 대체할 수 있습니다. React 19에서는 `createFactory` 가 제거되며, JSX로 마이그레이션해야 합니다:
```js
-// Before
+// 변경 전
import { createFactory } from 'react';
const button = createFactory('button');
```
```js
-// After
+// 변경 후
const button = ;
```
-#### Removed: `react-test-renderer/shallow` {/*removed-react-test-renderer-shallow*/}
+#### 제거됨: `react-test-renderer/shallow` {/*removed-react-test-renderer-shallow*/}
-In React 18, we updated `react-test-renderer/shallow` to re-export [react-shallow-renderer](https://github.com/enzymejs/react-shallow-renderer). In React 19, we're removing `react-test-render/shallow` to prefer installing the package directly:
+React 18에서는, `react-test-renderer/shallow` 를 [react-shallow-renderer](https://github.com/enzymejs/react-shallow-renderer)로 다시 내보내도록 업데이트했습니다. React 19에서는, `react-test-render/shallow` 가 완전히 제거되며, 대신 해당 패키지를 직접 설치해야 합니다:
```bash
npm install react-shallow-renderer --save-dev
@@ -346,42 +344,42 @@ npm install react-shallow-renderer --save-dev
-##### Please reconsider shallow rendering {/*please-reconsider-shallow-rendering*/}
+##### Shallow 렌더링 재고 권장 {/*please-reconsider-shallow-rendering*/}
-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).
+Shallow 렌더링은 React 내부 구현에 의존하며, 향후 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)로 테스트 마이그레이션하는 것을 권장합니다.
-### Removed deprecated React DOM APIs {/*removed-deprecated-react-dom-apis*/}
+### 더 이상 권장되지 않던 React DOM API 제거 {/*removed-deprecated-react-dom-apis*/}
-#### Removed: `react-dom/test-utils` {/*removed-react-dom-test-utils*/}
+#### 제거됨: `react-dom/test-utils` {/*removed-react-dom-test-utils*/}
-We've moved `act` from `react-dom/test-utils` to the `react` package:
+`act` 는 이제 `react-dom/test-utils` 대신 `react` 패키지에서 가져와야 합니다:
-`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info.
+`ReactDOMTestUtils.act` 는 더 이상 권장되지 않으며, 대신 `React.act`를 사용하세요. `react-dom/test-utils`가 아닌 `react`에서 `act`를 import 하세요. 자세한 내용은 https://react.dev/warnings/react-dom-test-utils 를 참조하세요.
-To fix this warning, you can import `act` from `react`:
+이 경고를 해결하려면, `react`에서 `act`를 import하세요:
```diff
- import {act} from 'react-dom/test-utils'
+ import {act} from 'react';
```
-All other `test-utils` functions have been removed. These utilities were uncommon, and made it too easy to depend on low level implementation details of your components and React. In React 19, these functions will error when called and their exports will be removed in a future version.
+기존의 다른 `test-utils` 함수들은 모두 제거되었습니다. 이러한 유틸리티는 흔히 사용되진 않았고, 컴포넌트나 React의 내부 구현에 과도하게 의존하게 만들 수 있었습니다. React 19에서는 이 함수들을 호출하면 에러가 발생하며, 추후 버전에서는 완전히 export도 제거될 예정입니다.
-See the [warning page](https://react.dev/warnings/react-dom-test-utils) for alternatives.
+대체 방법은 [경고 페이지](https://react.dev/warnings/react-dom-test-utils) 를 참고하세요.
-Codemod `ReactDOMTestUtils.act` to `React.act`:
+Codemod를 사용해 `ReactDOMTestUtils.act` 를 `React.act` 로 바꾸려면:
```bash
npx codemod@latest react/19/replace-act-import
@@ -389,16 +387,16 @@ npx codemod@latest react/19/replace-act-import
-#### Removed: `ReactDOM.render` {/*removed-reactdom-render*/}
+#### 제거됨: `ReactDOM.render` {/*removed-reactdom-render*/}
-`ReactDOM.render` was deprecated in [March 2022 (v18.0.0)](/blog/2022/03/08/react-18-upgrade-guide). In React 19, we're removing `ReactDOM.render` and you'll need to migrate to using [`ReactDOM.createRoot`](/reference/react-dom/client/createRoot):
+`ReactDOM.render`는 [2022년 3월 (v18.0.0)](/blog/2022/03/08/react-18-upgrade-guide)부터 더 이상 권장되지 않습니다. React 19에서는, `ReactDOM.render` 가 제거되며, [`ReactDOM.createRoot`](/reference/react-dom/client/createRoot)를 사용해야 합니다:
```js
-// Before
+// 변경 전
import {render} from 'react-dom';
render(, document.getElementById('root'));
-// After
+// 변경 후
import {createRoot} from 'react-dom/client';
const root = createRoot(document.getElementById('root'));
root.render();
@@ -406,7 +404,7 @@ root.render();
-Codemod `ReactDOM.render` to `ReactDOMClient.createRoot`:
+Codemod를 사용해 `ReactDOM.render` 를 `ReactDOMClient.createRoot`로 바꾸려면:
```bash
npx codemod@latest react/19/replace-reactdom-render
@@ -414,23 +412,23 @@ npx codemod@latest react/19/replace-reactdom-render
-#### Removed: `ReactDOM.hydrate` {/*removed-reactdom-hydrate*/}
+#### 제거됨: `ReactDOM.hydrate` {/*removed-reactdom-hydrate*/}
-`ReactDOM.hydrate` was deprecated in [March 2022 (v18.0.0)](/blog/2022/03/08/react-18-upgrade-guide). In React 19, we're removing `ReactDOM.hydrate` you'll need to migrate to using [`ReactDOM.hydrateRoot`](/reference/react-dom/client/hydrateRoot),
+`ReactDOM.hydrate`는 [2022년 3월 (v18.0.0)](/blog/2022/03/08/react-18-upgrade-guide)부터 더 이상 권장되지 않습니다. React 19에서는, `ReactDOM.hydrate` 가 제거되며, [`ReactDOM.hydrateRoot`](/reference/react-dom/client/hydrateRoot)로 마이그레이션 해야 합니다:
```js
-// Before
+// 변경 전
import {hydrate} from 'react-dom';
hydrate(, document.getElementById('root'));
-// After
+// 변경 후
import {hydrateRoot} from 'react-dom/client';
hydrateRoot(document.getElementById('root'), );
```
-Codemod `ReactDOM.hydrate` to `ReactDOMClient.hydrateRoot`:
+Codemod를 사용하여 `ReactDOM.hydrate` 를 `ReactDOMClient.hydrateRoot` 로 바꾸려면:
```bash
npx codemod@latest react/19/replace-reactdom-render
@@ -438,24 +436,24 @@ npx codemod@latest react/19/replace-reactdom-render
-#### Removed: `unmountComponentAtNode` {/*removed-unmountcomponentatnode*/}
+#### 제거됨: `unmountComponentAtNode` {/*removed-unmountcomponentatnode*/}
-`ReactDOM.unmountComponentAtNode` was deprecated in [March 2022 (v18.0.0)](https://react.dev/blog/2022/03/08/react-18-upgrade-guide). In React 19, you'll need to migrate to using `root.unmount()`.
+`ReactDOM.unmountComponentAtNode` 는 [2022년 3월 (v18.0.0)](https://react.dev/blog/2022/03/08/react-18-upgrade-guide)부터 더 이상 권장되지 않습니다. React 19부터는, `root.unmount()`를 사용해야 합니다.
```js
-// Before
+// 변경 전
unmountComponentAtNode(document.getElementById('root'));
-// After
+// 변경 후
root.unmount();
```
-For more see `root.unmount()` for [`createRoot`](https://react.dev/reference/react-dom/client/createRoot#root-unmount) and [`hydrateRoot`](https://react.dev/reference/react-dom/client/hydrateRoot#root-unmount).
+자세한 내용은 [`createRoot`](https://react.dev/reference/react-dom/client/createRoot#root-unmount) 및 [`hydrateRoot`](https://react.dev/reference/react-dom/client/hydrateRoot#root-unmount) 의 `root.unmount()` 문서를 참고하세요.
-Codemod `unmountComponentAtNode` to `root.unmount`:
+Codemod를 사용해 `unmountComponentAtNode` 를 `root.unmount` 로 바꾸려면:
```bash
npx codemod@latest react/19/replace-reactdom-render
@@ -463,14 +461,15 @@ npx codemod@latest react/19/replace-reactdom-render
-#### Removed: `ReactDOM.findDOMNode` {/*removed-reactdom-finddomnode*/}
+#### 제거됨: `ReactDOM.findDOMNode` {/*removed-reactdom-finddomnode*/}
-`ReactDOM.findDOMNode` was [deprecated in October 2018 (v16.6.0)](https://legacy.reactjs.org/blog/2018/10/23/react-v-16-6.html#deprecations-in-strictmode).
+`ReactDOM.findDOMNode` 는 [2018년 10월 (v16.6.0)](https://legacy.reactjs.org/blog/2018/10/23/react-v-16-6.html#deprecations-in-strictmode)부터 더 이상 권장되지 않습니다.
-We're removing `findDOMNode` because it was a legacy escape hatch that was slow to execute, fragile to refactoring, only returned the first child, and broke abstraction levels (see more [here](https://legacy.reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage)). You can replace `ReactDOM.findDOMNode` with [DOM refs](/learn/manipulating-the-dom-with-refs):
+`findDOMNode` 이 API는 과거의 회피 수단이었으나, 실행 속도가 느리고 리팩토링에 취약하며 첫 번째 자식만 반환하는 등 많은 문제가 있어 제거됩니다.
+(자세한 사항은 [here](https://legacy.reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage)). `ReactDOM.findDOMNode` 대신 [DOM refs](/learn/manipulating-the-dom-with-refs)를 사용하세요:
```js
-// Before
+// 변경 전
import {findDOMNode} from 'react-dom';
function AutoselectingInput() {
@@ -484,7 +483,7 @@ function AutoselectingInput() {
```
```js
-// After
+// 변경 후
function AutoselectingInput() {
const ref = useRef(null);
useEffect(() => {
@@ -495,65 +494,70 @@ function AutoselectingInput() {
}
```
-## New deprecations {/*new-deprecations*/}
+## 새로 사용 중단된 사항 {/*new-deprecations*/}
-### Deprecated: `element.ref` {/*deprecated-element-ref*/}
+### 사용 중단됨: `element.ref` {/*deprecated-element-ref*/}
-React 19 supports [`ref` as a prop](/blog/2024/04/25/react-19#ref-as-a-prop), so we're deprecating the `element.ref` in place of `element.props.ref`.
+React 19에서는 [`ref` 를 일반 prop으로 사용하는 기능](/blog/2024/04/25/react-19#ref-as-a-prop)을 도입함에 따라, 기존의 `element.ref` 접근 방식은 사용 중단되고, 대신 `element.props.ref`를 사용해야 합니다.
-Accessing `element.ref` will warn:
+`element.ref` 에 접근하면 아래와 같은 경고가 표시됩니다:
-Accessing element.ref is no longer supported. ref is now a regular prop. It will be removed from the JSX Element type in a future release.
+element.ref에 대한 접근은 더 이상 지원되지 않습니다. ref는 이제 일반 prop입니다. 향후 릴리스에서 JSX Element 타입에서 제거될 예정입니다.
-### Deprecated: `react-test-renderer` {/*deprecated-react-test-renderer*/}
+### 사용 중단됨: `react-test-renderer` {/*deprecated-react-test-renderer*/}
+
+`react-test-renderer` 는 자체 렌더러 환경을 구현하고 있으며, 이는 실제 사용자 환경과 일치하지 않으며, 내부 구현 세부 사항에 의존한 테스트를 유도하고 React 내부 구조를 분석하는 방식에 의존합니다.
+이러한 이유로 React 19에서는 `react-test-renderer`를 사용 중단 처리하였습니다.
+
+이 렌더리는 [React Testing Library](https://testing-library.com), 와 같은 더 나은 테스트 전략이 등장하기 이전에 만들어진 도구였습니다. 현재는 더 현대적이고 잘 지원되는 테스트 도구인 [@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) 를 사용하는 것이 권장됩니다.
-We are deprecating `react-test-renderer` because it implements its own renderer environment that doesn't match the environment users use, promotes testing implementation details, and relies on introspection of React's internals.
+React 19부터는, `react-test-renderer` 를 사용할 경우 사용 중단 경고가 로그로 출력되며, Concurrent Rendering을 사용하도록 변경되었습니다. 향후를 대비해 테스트를 React Testing Library 기반으로 이전하는 것을 추천합니다.
-The test renderer was created before there were more viable testing strategies available like [React Testing Library](https://testing-library.com), and we now recommend using a modern testing library instead.
+## 주목할 만한 변경 사항 {/*notable-changes*/}
-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.
+### StrictMode 관련 변경 사항 {/*strict-mode-improvements*/}
-## Notable changes {/*notable-changes*/}
+React 19는 Strict Mode에 대한 여러 버그 수정 및 개선사항을 포함합니다.
-### StrictMode changes {/*strict-mode-improvements*/}
+개발 환경에서 Strict Mode가 더블 렌더링을 수행할 때, `useMemo` 와 `useCallback` w은 첫 번째 렌더링의 메모이즈된 결과를 재사용합니다. 이미 Strict Mode에 호환되는 컴포넌트는 기존과 다르게 동작하지 않습니다.
-React 19 includes several fixes and improvements to Strict Mode.
+Strict Mode의 모든 동작과 마찬가지로, 이러한 변경은 프로덕션에 배포되기 전 개발 중 버그를 사전에 찾기 위한 목적입니다. 예를 들어 개발 중에는, 컴포넌트가 Suspense fallback으로 교체되는 상황을 시뮬레이션하기 위해 ref 콜백 함수가 초기 마운트 시 두 번 호출됩니다.
-When double rendering in Strict Mode in development, `useMemo` and `useCallback` will reuse the memoized results from the first render during the second render. Components that are already Strict Mode compatible should not notice a difference in behavior.
+### Suspense 개선 사항 {/*improvements-to-suspense*/}
-As with all Strict Mode behaviors, these features are designed to proactively surface bugs in your components during development so you can fix them before they are shipped to production. For example, during development, Strict Mode will double-invoke ref callback functions on initial mount, to simulate what happens when a mounted component is replaced by a Suspense fallback.
+React 19에서는 컴포넌트가 **서스펜드(suspend)**되면, React는 더 이상 전체 형제 컴포넌트를 렌더링할 때까지 기다리지 않고 **가장 가까운 Suspense 경계의 fallback을 즉시 렌더링(commit)**합니다.
-### Improvements to Suspense {/*improvements-to-suspense*/}
+fallback이 렌더링된 후, 서스펜드된 형제 컴포넌트들은 따로 렌더링되며 이 과정을 통해 나머지 트리의 lazy 요청을 "미리 준비(pre-warm)"하게 됩니다.
-In React 19, when a component suspends, React will immediately commit the fallback of the nearest Suspense boundary without waiting for the entire sibling tree to render. After the fallback commits, React schedules another render for the suspended siblings to "pre-warm" lazy requests in the rest of the tree:
+이 변경으로 인해 Suspense fallback은 더 빠르게 표시되며, 동시에 lazy 요청에 대한 성능 최적화 효과도 유지됩니다.
-Previously, when a component suspended, the suspended siblings were rendered and then the fallback was committed.
+이전에는 컴포넌트가 서스펜드될 때, **서스펜드된 형제 컴포넌트들을 먼저 렌더링한 후에 fallback이 렌더링(commit)**되었습니다.
-In React 19, when a component suspends, the fallback is committed and then the suspended siblings are rendered.
+하지만 React 19에서는, 컴포넌트가 서스펜드되면 **먼저 fallback이 렌더링(commit)**되고, 그 후에 서스펜드된 형제 컴포넌트들이 렌더링됩니다.
-This change means Suspense fallbacks display faster, while still warming lazy requests in the suspended tree.
+이 변경으로 인해 Suspense fallback이 더 빠르게 표시되며, 동시에 **서스펜드된 트리의 lazy 요청을 미리 준비(pre-warm)**할 수 있게 됩니다.
-### UMD builds removed {/*umd-builds-removed*/}
+### UMD 빌드 제거 {/*umd-builds-removed*/}
-UMD was widely used in the past as a convenient way to load React without a build step. Now, there are modern alternatives for loading modules as scripts in HTML documents. Starting with React 19, React will no longer produce UMD builds to reduce the complexity of its testing and release process.
-
-To load React 19 with a script tag, we recommend using an ESM-based CDN such as [esm.sh](https://esm.sh/).
+UMD는 과거에 빌드 도구 없이 React를 HTML에서 스크립트 태그로 로드할 수 있도록 돕는 주요 방식이었으나, 이제는 더 현대적인 모듈 로딩 방법이 있습니다.
+React 19부터는 UMD 빌드를 더 이상 제공하지 않습니다. 이는 테스트 및 릴리스 프로세스의 복잡도를 줄이기 위함입니다.
+React 19를
```
-### Libraries depending on React internals may block upgrades {/*libraries-depending-on-react-internals-may-block-upgrades*/}
+### React 내부에 의존하는 라이브러리는 업그레이드를 막을 수 있음 {/*libraries-depending-on-react-internals-may-block-upgrades*/}
-This release includes changes to React internals that may impact libraries that ignore our pleas to not use internals like `SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`. These changes are necessary to land improvements in React 19, and will not break libraries that follow our guidelines.
+이번 릴리스에서는 React 내부 구조에 대한 변경이 포함되어 있습니다. `SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`같은 내부 API에 의존하는 라이브러리는 영향을 받을 수 있습니다.
+이러한 변경은 React 19의 개선을 위한 필수 작업이며, 공식 가이드를 따르는 라이브러리에는 영향을 주지 않습니다.
-Based on our [Versioning Policy](https://react.dev/community/versioning-policy#what-counts-as-a-breaking-change), these updates are not listed as breaking changes, and we are not including docs for how to upgrade them. The recommendation is to remove any code that depends on internals.
+우리의 [버전 관리 정책](https://react.dev/community/versioning-policy#what-counts-as-a-breaking-change)에 따르면, 이러한 업데이트는 **주요 변경 사항**으로 간주되지 않으며, 업그레이드 방법에 대한 문서도 제공하지 않습니다. 권장 사항은 내부 구현에 의존하는 코드를 제거하는 것입니다.
-To reflect the impact of using internals, we have renamed the `SECRET_INTERNALS` suffix to:
+내부 구현을 사용하는 것이 얼마나 영향을 줄 수 있는지를 반영하기 위해, `SECRET_INTERNALS` 접미사를 다음과 같이 변경했습니다:
`_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`
-In the future we will more aggressively block accessing internals from React to discourage usage and ensure users are not blocked from upgrading.
+앞으로는 React의 내부 구현에 접근하는 것을 더 강력하게 차단할 예정이며, 이는 사용자들이 React 업그레이드에 막히지 않도록 보장하기 위한 조치입니다.
-## TypeScript changes {/*typescript-changes*/}
+## TypeScript 관련 변경 사항 {/*typescript-changes*/}
-### Removed deprecated TypeScript types {/*removed-deprecated-typescript-types*/}
+### 제거된 TypeScript 타입 {/*removed-deprecated-typescript-types*/}
-We've cleaned up the TypeScript types based on the removed APIs in React 19. Some of the removed have types been moved to more relevant packages, and others are no longer needed to describe React's behavior.
+React 19에서 제거된 API에 따라 관련 TypeScript 타입도 정리되었습니다. 일부 타입은 더 적절한 패키지로 이동되었고, 일부는 더 이상 필요하지 않아 삭제되었습니다.
-We've published [`types-react-codemod`](https://github.com/eps1lon/types-react-codemod/) to migrate most type related breaking changes:
+저희는 대부분의 타입 관련 브레이킹 변경사항을 자동으로 마이그레이션하기 위한 [`types-react-codemod`](https://github.com/eps1lon/types-react-codemod/)를 공개했습니다:
```bash
npx types-react-codemod@latest preset-19 ./path-to-app
```
-If you have a lot of unsound access to `element.props`, you can run this additional codemod:
+`element.props`에 대한 비타입 안전 접근이 많은 경우, 아래 추가 codemod를 실행할 수 있습니다:
```bash
npx types-react-codemod@latest react-element-default-any-props ./path-to-your-react-ts-files
@@ -596,28 +601,28 @@ npx types-react-codemod@latest react-element-default-any-props ./path-to-your-re
-Check out [`types-react-codemod`](https://github.com/eps1lon/types-react-codemod/) for a list of supported replacements. If you feel a codemod is missing, it can be tracked in the [list of missing React 19 codemods](https://github.com/eps1lon/types-react-codemod/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22React+19%22+label%3Aenhancement).
+[`types-react-codemod`](https://github.com/eps1lon/types-react-codemod/) 저장소에서 지원되는 대체 codemod 목록을 확인할 수 있습니다. 만약 누락된 codemod가 있다고 생각된다면, [React 19 누락 codemod 목록](https://github.com/eps1lon/types-react-codemod/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22React+19%22+label%3Aenhancement)에서 추적할 수 있습니다.
-### `ref` cleanups required {/*ref-cleanup-required*/}
+### `ref` 정리 필요 {/*ref-cleanup-required*/}
-_This change is included in the `react-19` codemod preset as [`no-implicit-ref-callback-return
-`](https://github.com/eps1lon/types-react-codemod/#no-implicit-ref-callback-return)._
+_이 변경 사항은`react-19` codemod 프리셋에 포함된 [`no-implicit-ref-callback-return
+`](https://github.com/eps1lon/types-react-codemod/#no-implicit-ref-callback-return)항목에 해당합니다._
-Due to the introduction of ref cleanup functions, returning anything else from a ref callback will now be rejected by TypeScript. The fix is usually to stop using implicit returns:
+ref cleanup 함수 도입에 따라, **ref 콜백이 값을 암시적으로 반환하는 경우(TypeScript에서는 명확히 cleanup 함수인지 판단 불가)**를 허용하지 않습니다. 이를 해결하기 위해 암시적 반환을 사용하지 않도록 코드를 수정해야 합니다:
```diff [[1, 1, "("], [1, 1, ")"], [2, 2, "{", 15], [2, 2, "}", 1]]
-
(instance = current)} />
+
{instance = current}} />
```
-The original code returned the instance of the `HTMLDivElement` and TypeScript wouldn't know if this was supposed to be a cleanup function or not.
+원래 코드에서는 `HTMLDivElement` 인스턴스를 반환했기 때문에, TypeScript는 이것이 정리 함수인지 아닌지 구분할 수 없습니다.
-### `useRef` requires an argument {/*useref-requires-argument*/}
+### `useRef`는 인자가 필수 {/*useref-requires-argument*/}
-_This change is included in the `react-19` codemod preset as [`refobject-defaults`](https://github.com/eps1lon/types-react-codemod/#refobject-defaults)._
+_이 변경 사항은 `react-19` codemod 프리셋에 포함된 [`refobject-defaults`](https://github.com/eps1lon/types-react-codemod/#refobject-defaults)항목에 해당합니다._
-A long-time complaint of how TypeScript and React work has been `useRef`. We've changed the types so that `useRef` now requires an argument. This significantly simplifies its type signature. It'll now behave more like `createContext`.
+TypeScript와 React의 오랜 불만이었던 `useRef` 사용 방식이 변경되었습니다. 이제 `useRef` 는 인자를 반드시 요구하며, 이는 타입 시그니처를 더 명확하게 단순화하고 `createContext` 처럼 동작하게 됩니다.
```ts
// @ts-expect-error: Expected 1 argument but saw none
@@ -630,7 +635,7 @@ createContext();
createContext(undefined);
```
-This now also means that all refs are mutable. You'll no longer hit the issue where you can't mutate a ref because you initialised it with `null`:
+이제 모든 ref는 변경 가능하다는 것을 의미합니다. 더 이상 `null`로 초기화했기 때문에 ref를 변경할 수 없는 문제는 발생하지 않습니다:
```ts
const ref = useRef(null);
@@ -639,7 +644,7 @@ const ref = useRef(null);
ref.current = 1;
```
-`MutableRef` is now deprecated in favor of a single `RefObject` type which `useRef` will always return:
+`MutableRef`는 이제 사용 중단되었으며, `useRef` 는 항상 단일 `RefObject` 타입을 반환합니다.
```ts
interface RefObject {
@@ -649,36 +654,37 @@ interface RefObject {
declare function useRef: RefObject
```
-`useRef` still has a convenience overload for `useRef(null)` that automatically returns `RefObject`. To ease migration due to the required argument for `useRef`, a convenience overload for `useRef(undefined)` was added that automatically returns `RefObject`.
+`useRef(null)` 에 대해서는 여전히 편의 오버로드가 제공되어, 자동으로 `RefObject`을 반환합니다. `useRef`에 인자가 필요하도록 변경됨에 따라 마이그레이션을 쉽게 하기 위해, `useRef(undefined)`도 자동으로 `RefObject`를 반환하는 오버로드가 추가되었습니다.
-Check out [[RFC] Make all refs mutable](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64772) for prior discussions about this change.
+이 변경에 대한 논의는 [[RFC] 모든 ref를 mutable로 만들기](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/64772)에서 확인하실 수 있습니다.
-### Changes to the `ReactElement` TypeScript type {/*changes-to-the-reactelement-typescript-type*/}
+### `ReactElement` TypeScript 타입의 변경 사항 {/*changes-to-the-reactelement-typescript-type*/}
-_This change is included in the [`react-element-default-any-props`](https://github.com/eps1lon/types-react-codemod#react-element-default-any-props) codemod._
+_이 변경사항은 [`react-element-default-any-props`](https://github.com/eps1lon/types-react-codemod#react-element-default-any-props) codemod에 포함되어 있습니다._
-The `props` of React elements now default to `unknown` instead of `any` if the element is typed as `ReactElement`. This does not affect you if you pass a type argument to `ReactElement`:
+`ReactElement`로 타입이 지정된 요소의 `props` 기본 타입이 `any`에서 `unknown`으로 변경되었습니다. 단, `ReactElement`에 타입 인자를 명시적으로 제공하는 경우에는 영향을 받지 않습니다:
```ts
type Example2 = ReactElement<{ id: string }>["props"];
// ^? { id: string }
```
-But if you relied on the default, you now have to handle `unknown`:
+하지만 이전에 기본값을 사용한 경우, 이제는 `unknown`을 처리해야 합니다:
```ts
type Example = ReactElement["props"];
// ^? Before, was 'any', now 'unknown'
```
-You should only need it if you have a lot of legacy code relying on unsound access of element props. Element introspection only exists as an escape hatch, and you should make it explicit that your props access is unsound via an explicit `any`.
+이 변경은 주로 element.props에 대한 불안정한 접근을 많이 사용한 레거시 코드에 영향을 줍니다.
+Element introspection(요소 내부 속성 접근)은 예외적인 경우에만 사용되어야 하며, `any`를 명시적으로 사용해 타입 안정성이 없음을 드러내는 것이 좋습니다.
-### The JSX namespace in TypeScript {/*the-jsx-namespace-in-typescript*/}
-This change is included in the `react-19` codemod preset as [`scoped-jsx`](https://github.com/eps1lon/types-react-codemod#scoped-jsx)
+### TypeScript의 JSX 네임스페이스 변경 {/*the-jsx-namespace-in-typescript*/}
+이 변경은 `react-19` codemod preset의 [`scoped-jsx`](https://github.com/eps1lon/types-react-codemod#scoped-jsx)항목에 포함되어 있습니다.
-A long-time request is to remove the global `JSX` namespace from our types in favor of `React.JSX`. This helps prevent pollution of global types which prevents conflicts between different UI libraries that leverage JSX.
+오랫동안 요청된 기능 중 하나는 전역 `JSX` 네임스페이스를 제거하고 `React.JSX` 로 대체하는 것이었습니다. 이 변경은 JSX를 사용하는 다양한 UI 라이브러리 간의 타입 충돌을 방지하기 위해 글로벌 타입 오염을 줄이는 데 도움이 됩니다.
-You'll now need to wrap module augmentation of the JSX namespace in `declare module "....":
+이제 JSX 네임스페이스 확장은 다음처럼 `declare module "...."을 통해 감싸야 합니다:
```diff
// global.d.ts
@@ -693,62 +699,64 @@ You'll now need to wrap module augmentation of the JSX namespace in `declare mod
+ }
```
-The exact module specifier depends on the JSX runtime you specified in the `compilerOptions` of your `tsconfig.json`:
+`tsconfig.json`의 `compilerOptions`에서 지정한 JSX 런타임 설정에 따라 정확한 모듈 명세자는 다음과 같이 달라집니다:
-- For `"jsx": "react-jsx"` it would be `react/jsx-runtime`.
-- For `"jsx": "react-jsxdev"` it would be `react/jsx-dev-runtime`.
-- For `"jsx": "react"` and `"jsx": "preserve"` it would be `react`.
+- `"jsx": "react-jsx"` 인 경우 →`react/jsx-runtime`.
+- `"jsx": "react-jsxdev"` 인 경우 → `react/jsx-dev-runtime`.
+- `"jsx": "react"` 또는 `"jsx": "preserve"` 인 경우 → `react`.
-### Better `useReducer` typings {/*better-usereducer-typings*/}
+### `useReducer` 타입 추론 개선 {/*better-usereducer-typings*/}
-`useReducer` now has improved type inference thanks to [@mfp22](https://github.com/mfp22).
+[@mfp22](https://github.com/mfp22)의 기여 덕분에, `useReducer`는 이제 더 나은 타입 추론을 제공합니다.
-However, this required a breaking change where `useReducer` doesn't accept the full reducer type as a type parameter but instead either needs none (and rely on contextual typing) or needs both the state and action type.
+그러나 이로 인해 약간의 호환성 깨짐이 발생했으며, 이제 `useReducer`는 전체 리듀서 타입을 타입 인자로 받지 않고, 아예 타입 인자를 생략하거나 state와 action 타입을 둘 다 명시해야 합니다.
-The new best practice is _not_ to pass type arguments to `useReducer`.
+새로운 권장 방식은 타입 인자를 `useReducer`에 넘기지 _않는_ 것입니다.
```diff
- useReducer>(reducer)
+ useReducer(reducer)
```
-This may not work in edge cases where you can explicitly type the state and action, by passing in the `Action` in a tuple:
+
+예외적으로 타입이 제대로 추론되지 않는 경우에는 다음처럼 `Action`을 튜플로 넘겨서 명시적으로 지정할 수 있습니다:
```diff
- useReducer>(reducer)
+ useReducer(reducer)
```
-If you define the reducer inline, we encourage to annotate the function parameters instead:
+
+리듀서를 인라인으로 정의하는 경우, 함수 매개변수에 타입을 지정하는 방식이 권장됩니다:
```diff
- useReducer>((state, action) => state)
+ useReducer((state: State, action: Action) => state)
```
-This is also what you'd also have to do if you move the reducer outside of the `useReducer` call:
+또는 리듀서를 `useReducer` 외부에 정의하는 경우에도 다음과 같이 작성할 수 있습니다:
```ts
const reducer = (state: State, action: Action) => state;
```
-## Changelog {/*changelog*/}
+## 변경 로그 {/*changelog*/}
-### Other breaking changes {/*other-breaking-changes*/}
+### 기타 주요 변경사항 {/*other-breaking-changes*/}
-- **react-dom**: Error for javascript URLs in `src` and `href` [#26507](https://github.com/facebook/react/pull/26507)
-- **react-dom**: Remove `errorInfo.digest` from `onRecoverableError` [#28222](https://github.com/facebook/react/pull/28222)
-- **react-dom**: Remove `unstable_flushControlled` [#26397](https://github.com/facebook/react/pull/26397)
-- **react-dom**: Remove `unstable_createEventHandle` [#28271](https://github.com/facebook/react/pull/28271)
-- **react-dom**: Remove `unstable_renderSubtreeIntoContainer` [#28271](https://github.com/facebook/react/pull/28271)
-- **react-dom**: Remove `unstable_runWithPriority` [#28271](https://github.com/facebook/react/pull/28271)
-- **react-is**: Remove deprecated methods from `react-is` [28224](https://github.com/facebook/react/pull/28224)
+- **react-dom**: `src` 및 `href` 속성에 JavaScript URL 사용 시 오류 발생 [#26507](https://github.com/facebook/react/pull/26507)
+- **react-dom**: `onRecoverableError` 에서 `errorInfo.digest` 제거 [#28222](https://github.com/facebook/react/pull/28222)
+- **react-dom**: `unstable_flushControlled` 제거 [#26397](https://github.com/facebook/react/pull/26397)
+- **react-dom**: `unstable_createEventHandle` 제거 [#28271](https://github.com/facebook/react/pull/28271)
+- **react-dom**: `unstable_renderSubtreeIntoContainer` 제거 [#28271](https://github.com/facebook/react/pull/28271)
+- **react-dom**: `unstable_runWithPriority` 제거 [#28271](https://github.com/facebook/react/pull/28271)
+- **react-is**: `react-is` 에서 사용 중단된 메서드 제거 [28224](https://github.com/facebook/react/pull/28224)
-### Other notable changes {/*other-notable-changes*/}
+### 기타 주목할 만한 변경사항 {/*other-notable-changes*/}
-- **react**: Batch sync, default and continuous lanes [#25700](https://github.com/facebook/react/pull/25700)
-- **react**: Don't prerender siblings of suspended component [#26380](https://github.com/facebook/react/pull/26380)
-- **react**: Detect infinite update loops caused by render phase updates [#26625](https://github.com/facebook/react/pull/26625)
-- **react-dom**: Transitions in popstate are now synchronous [#26025](https://github.com/facebook/react/pull/26025)
-- **react-dom**: Remove layout effect warning during SSR [#26395](https://github.com/facebook/react/pull/26395)
-- **react-dom**: Warn and don’t set empty string for src/href (except anchor tags) [#28124](https://github.com/facebook/react/pull/28124)
+- **react**: 동기, 기본, 지속적 lane 처리 배치 적용 [#25700](https://github.com/facebook/react/pull/25700)
+- **react**: 중단된 컴포넌트의 형제 요소 선렌더링 방지 [#26380](https://github.com/facebook/react/pull/26380)
+- **react**: 렌더 단계에서의 업데이트로 인해 발생하는 무한 루프 감지 [#26625](https://github.com/facebook/react/pull/26625)
+- **react-dom**: popstate에서의 전환을 이제 동기적으로 처리 [#26025](https://github.com/facebook/react/pull/26025)
+- **react-dom**: SSR 중 layout effect 경고 제거 [#26395](https://github.com/facebook/react/pull/26395)
+- **react-dom**: src나 href에 빈 문자열 설정 시 경고 및 무시 (단, 태그 제외) [#28124](https://github.com/facebook/react/pull/28124)
-For a full list of changes, please see the [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md#1900-december-5-2024).
+전체 변경사항은 [변경 로그 전체 보기](https://github.com/facebook/react/blob/main/CHANGELOG.md#1900-december-5-2024)를 참고하세요.
---
-Thanks to [Andrew Clark](https://twitter.com/acdlite), [Eli White](https://twitter.com/Eli_White), [Jack Pope](https://github.com/jackpope), [Jan Kassens](https://github.com/kassens), [Josh Story](https://twitter.com/joshcstory), [Matt Carroll](https://twitter.com/mattcarrollcode), [Noah Lemen](https://twitter.com/noahlemen), [Sophie Alpert](https://twitter.com/sophiebits), and [Sebastian Silbermann](https://twitter.com/sebsilbermann) for reviewing and editing this post.
+이 포스트의 리뷰 및 편집에 도움을 준 분들께 감사드립니다: [Andrew Clark](https://twitter.com/acdlite), [Eli White](https://twitter.com/Eli_White), [Jack Pope](https://github.com/jackpope), [Jan Kassens](https://github.com/kassens), [Josh Story](https://twitter.com/joshcstory), [Matt Carroll](https://twitter.com/mattcarrollcode), [Noah Lemen](https://twitter.com/noahlemen), [Sophie Alpert](https://twitter.com/sophiebits), and [Sebastian Silbermann](https://twitter.com/sebsilbermann)