diff --git a/.github/ISSUE_TEMPLATE/2-suggestion.yml b/.github/ISSUE_TEMPLATE/2-suggestion.yml
deleted file mode 100644
index ac0b480fe..000000000
--- a/.github/ISSUE_TEMPLATE/2-suggestion.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: "๐ก Suggestions"
-description: "Suggest a new page, section, or edit for an existing page."
-title: "[Suggestion]: "
-labels: ["type: documentation"]
-body:
- - type: textarea
- attributes:
- label: Summary
- description: |
- A clear and concise summary of what we should add.
- placeholder: |
- Example:
- Add a new page for how to use React with TypeScript.
- validations:
- required: true
- - type: input
- attributes:
- label: Page
- description: |
- What page is this about?
- placeholder: |
- https://react.dev/
- validations:
- required: false
- - type: textarea
- attributes:
- label: Details
- description: |
- Please provide a explanation for what you're suggesting.
- placeholder: |
- Example:
- I think it would be helpful to have a page that explains how to use React with TypeScript. This could include a basic example of a component written in TypeScript, and a link to the TypeScript documentation.
- validations:
- required: true
diff --git a/.gitignore b/.gitignore
index 7bf71dbc5..be4e56a88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,8 @@ public/fonts/**/Optimistic_*.woff2
# rss
public/rss.xml
+
+# code editor
+.cursor
+.idea
+*.code-workspace
diff --git a/VScode.code-workspace b/VScode.code-workspace
deleted file mode 100644
index c7223d8ef..000000000
--- a/VScode.code-workspace
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "folders": [
- {
- "path": "."
- }
- ]
-}
diff --git a/src/components/MDX/ExpandableCallout.tsx b/src/components/MDX/ExpandableCallout.tsx
index 73e0e4dc4..48634ffe5 100644
--- a/src/components/MDX/ExpandableCallout.tsx
+++ b/src/components/MDX/ExpandableCallout.tsx
@@ -27,7 +27,7 @@ interface ExpandableCalloutProps {
const variantMap = {
deprecated: {
- title: '๋ ์ด์ ์ฌ์ฉ๋์ง ์์ต๋๋ค',
+ title: '๋ ์ด์ ์ฌ์ฉ๋์ง ์์ต๋๋ค!',
Icon: IconWarning,
containerClasses: 'bg-red-5 dark:bg-red-60 dark:bg-opacity-20',
textColor: 'text-red-50 dark:text-red-40',
@@ -53,7 +53,7 @@ const variantMap = {
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
},
experimental: {
- title: 'Experimental Feature',
+ title: '์คํ์ ๊ธฐ๋ฅ',
Icon: IconCanary,
containerClasses:
'bg-green-5 dark:bg-green-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
@@ -70,7 +70,7 @@ const variantMap = {
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
wip: {
- title: '๊ฐ๋ฐ์ค์ด์์',
+ title: '๊ฐ๋ฐ์ค์ด์์!',
Icon: IconNote,
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
textColor: 'text-yellow-50 dark:text-yellow-40',
diff --git a/src/content/reference/react/forwardRef.md b/src/content/reference/react/forwardRef.md
index fc6fffa90..b068b57d1 100644
--- a/src/content/reference/react/forwardRef.md
+++ b/src/content/reference/react/forwardRef.md
@@ -4,15 +4,15 @@ title: forwardRef
-In React 19, `forwardRef` is no longer necessary. Pass `ref` as a prop instead.
+React 19๋ถํฐ๋ ๋ ์ด์ `forwardRef`์ด ํ์ํ์ง ์์ต๋๋ค. ์ด์ `ref`๋ฅผ Prop์ผ๋ก ์ง์ ์ ๋ฌํ๋ฉด ๋ฉ๋๋ค.
-`forwardRef` will deprecated in a future release. Learn more [here](/blog/2024/04/25/react-19#ref-as-a-prop).
+`forwardRef`๋ ํฅํ ๋ฆด๋ฆฌ์ค์์ ์ฌ์ฉ ์ค๋จDeprecated๋ ์์ ์
๋๋ค. ์์ธํ ๋ด์ฉ์ [์ฌ๊ธฐ](/blog/2024/12/05/react-19#ref-as-a-prop)์์ ํ์ธํ์ธ์.
-`forwardRef`๋ฅผ ์ฌ์ฉํ๋ฉด ์ปดํฌ๋ํธ๊ฐ [ref](/learn/manipulating-the-dom-with-refs)๋ฅผ ์ฌ์ฉํ์ฌ ๋ถ๋ชจ ์ปดํฌ๋ํธ์ DOM ๋
ธ๋๋ฅผ ๋
ธ์ถํ ์ ์์ต๋๋ค.
+`forwardRef`๋ฅผ ์ฌ์ฉํ๋ฉด ์ปดํฌ๋ํธ๊ฐ [Ref](/learn/manipulating-the-dom-with-refs)๋ฅผ ์ฌ์ฉํ์ฌ ๋ถ๋ชจ ์ปดํฌ๋ํธ์ DOM ๋
ธ๋๋ฅผ ๋
ธ์ถํ ์ ์์ต๋๋ค.
```js
const SomeComponent = forwardRef(render)
@@ -28,7 +28,7 @@ const SomeComponent = forwardRef(render)
### `forwardRef(render)` {/*forwardref*/}
-์ปดํฌ๋ํธ๊ฐ ref๋ฅผ ๋ฐ์ ํ์ ์ปดํฌ๋ํธ๋ก ์ ๋ฌํ๋๋ก ํ๋ ค๋ฉด `forwardRef()`๋ฅผ ํธ์ถํ์ธ์.
+์ปดํฌ๋ํธ๊ฐ Ref๋ฅผ ๋ฐ์ ํ์ ์ปดํฌ๋ํธ๋ก ์ ๋ฌํ๋๋ก ํ๋ ค๋ฉด `forwardRef()`๋ฅผ ํธ์ถํ์ธ์.
```js
import { forwardRef } from 'react';
@@ -42,22 +42,22 @@ const MyInput = forwardRef(function MyInput(props, ref) {
#### ๋งค๊ฐ๋ณ์ {/*parameters*/}
-* `render`: ์ปดํฌ๋ํธ์ ๋ ๋๋ง ํจ์์
๋๋ค. React๋ ์ปดํฌ๋ํธ๊ฐ ๋ถ๋ชจ๋ก๋ถํฐ ๋ฐ์ props์ `ref`๋ก ์ด ํจ์๋ฅผ ํธ์ถํฉ๋๋ค. ๋ฐํํ๋ JSX๋ ์ปดํฌ๋ํธ์ ๊ฒฐ๊ณผ๊ฐ ๋ฉ๋๋ค.
+* `render`: ์ปดํฌ๋ํธ์ ๋ ๋๋ง ํจ์์
๋๋ค. React๋ ์ปดํฌ๋ํธ๊ฐ ๋ถ๋ชจ๋ก๋ถํฐ ๋ฐ์ `props`์ `ref`๋ก ์ด ํจ์๋ฅผ ํธ์ถํฉ๋๋ค. ๋ฐํํ๋ JSX๋ ์ปดํฌ๋ํธ์ ๊ฒฐ๊ณผ๊ฐ ๋ฉ๋๋ค.
#### ๋ฐํ๊ฐ {/*returns*/}
-`forwardRef`๋ JSX์์ ๋ ๋๋งํ ์ ์๋ React ์ปดํฌ๋ํธ๋ฅผ ๋ฐํํฉ๋๋ค. ์ผ๋ฐ ํจ์๋ก ์ ์๋ React ์ปดํฌ๋ํธ์ ๋ค๋ฅด๊ฒ, `forwardRef`๊ฐ ๋ฐํํ๋ ์ปดํฌ๋ํธ๋ `ref` prop๋ ๋ฐ์ ์ ์์ต๋๋ค.
+`forwardRef`๋ JSX์์ ๋ ๋๋งํ ์ ์๋ React ์ปดํฌ๋ํธ๋ฅผ ๋ฐํํฉ๋๋ค. ์ผ๋ฐ ํจ์๋ก ์ ์๋ React ์ปดํฌ๋ํธ์ ๋ค๋ฅด๊ฒ, `forwardRef`๊ฐ ๋ฐํํ๋ ์ปดํฌ๋ํธ๋ `ref` Prop๋ ๋ฐ์ ์ ์์ต๋๋ค.
#### ์ฃผ์ ์ฌํญ {/*caveats*/}
-* Strict Mode์์ React๋ [์ค์๋ก ๋ฐ์ํ ๊ฒฐํจ์ ์ฐพ๊ธฐ ์ํด](/reference/react/useState#my-initializer-or-updater-function-runs-twice) **๋ ๋๋ง ํจ์๋ฅผ ๋ ๋ฒ ํธ์ถ**ํฉ๋๋ค. ์ด๋ ๊ฐ๋ฐ ํ๊ฒฝ ์ ์ฉ ๋์์ด๋ฉฐ ํ๋ก๋์
ํ๊ฒฝ์๋ ์ํฅ์ ๋ฏธ์น์ง ์์ต๋๋ค. ๋ ๋๋ง ํจ์๊ฐ ์์ํจ์์ธ ๊ฒฝ์ฐ(๊ทธ๋์ผ๋ง ํฉ๋๋ค.) ์ปดํฌ๋ํธ ๋ก์ง์ ์ํฅ์ ๋ฏธ์น์ง ์์ต๋๋ค. ํธ์ถ ๊ฒฐ๊ณผ ์ค ํ๋์ ๊ฒฐ๊ณผ๋ ๋ฌด์๋ฉ๋๋ค.
+* Strict Mode์์ React๋ [์ค์๋ก ๋ฐ์ํ ๊ฒฐํจ์ ์ฐพ๊ธฐ ์ํด](/reference/react/useState#my-initializer-or-updater-function-runs-twice) **๋ ๋๋ง ํจ์๋ฅผ ๋ ๋ฒ ํธ์ถ**ํฉ๋๋ค. ์ด๋ ๊ฐ๋ฐ ํ๊ฒฝ ์ ์ฉ ๋์์ด๋ฉฐ ํ๋ก๋์
ํ๊ฒฝ์๋ ์ํฅ์ ๋ฏธ์น์ง ์์ต๋๋ค. ๋ ๋๋ง ํจ์๊ฐ ์์ ํจ์์ธ ๊ฒฝ์ฐ(๊ทธ๋์ผ๋ง ํฉ๋๋ค), ์ปดํฌ๋ํธ ๋ก์ง์ ์ํฅ์ ๋ฏธ์น์ง ์์ต๋๋ค. ํธ์ถ ๊ฒฐ๊ณผ ์ค ํ๋์ ๊ฒฐ๊ณผ๋ ๋ฌด์๋ฉ๋๋ค.
---
### `render` ํจ์ {/*render-function*/}
-`forwardRef`๋ `render` ํจ์๋ฅผ ์ธ์๋ก ๋ฐ์ต๋๋ค. React๋ `props`์ `ref`์ ํจ๊ป ์ด ํจ์๋ฅผ ํธ์ถํฉ๋๋ค.
+`forwardRef`๋ `render` ํจ์๋ฅผ ์ธ์๋ก ๋ฐ์ต๋๋ค. React๋ `props` ๋ฐ `ref`์ ํจ๊ป ์ด ํจ์๋ฅผ ํธ์ถํฉ๋๋ค.
```js
const MyInput = forwardRef(function MyInput(props, ref) {
@@ -72,13 +72,13 @@ const MyInput = forwardRef(function MyInput(props, ref) {
#### ๋งค๊ฐ๋ณ์ {/*render-parameters*/}
-* `props`: ๋ถ๋ชจ ์ปดํฌ๋ํธ๊ฐ ์ ๋ฌํ props์
๋๋ค.
+* `props`: ๋ถ๋ชจ ์ปดํฌ๋ํธ๊ฐ ์ ๋ฌํ Props์
๋๋ค.
-* `ref`: ๋ถ๋ชจ ์ปดํฌ๋ํธ๊ฐ ์ ๋ฌํ `ref` ์ดํธ๋ฆฌ๋ทฐํธ์
๋๋ค. `ref`๋ ๊ฐ์ฒด๋ ํจ์์ผ ์ ์์ต๋๋ค. ๋ถ๋ชจ ์ปดํฌ๋ํธ๊ฐ ref๋ฅผ ์ ๋ฌํ์ง ์์ ๊ฒฝ์ฐ `null`์ด ๋ฉ๋๋ค. ์ ๋ฌ๋ฐ์ `ref`๋ฅผ ๋ค๋ฅธ ์ปดํฌ๋ํธ์ ์ ๋ฌํ๊ฑฐ๋ [`useImperativeHandle`.](/reference/react/useImperativeHandle)์ ์ ๋ฌํด์ผ ํฉ๋๋ค.
+* `ref`: ๋ถ๋ชจ ์ปดํฌ๋ํธ๊ฐ ์ ๋ฌํ `ref` ์ดํธ๋ฆฌ๋ทฐํธ์
๋๋ค. `ref`๋ ๊ฐ์ฒด๋ ํจ์์ผ ์ ์์ต๋๋ค. ๋ถ๋ชจ ์ปดํฌ๋ํธ๊ฐ Ref๋ฅผ ์ ๋ฌํ์ง ์์ ๊ฒฝ์ฐ `null`์ด ๋ฉ๋๋ค. ์ ๋ฌ๋ฐ์ `ref`๋ฅผ ๋ค๋ฅธ ์ปดํฌ๋ํธ์ ์ ๋ฌํ๊ฑฐ๋ [`useImperativeHandle`](/reference/react/useImperativeHandle)์ ์ ๋ฌํด์ผ ํฉ๋๋ค.
#### ๋ฐํ๊ฐ {/*render-returns*/}
-`forwardRef`๋ JSX์์ ๋ ๋๋งํ ์ ์๋ React ์ปดํฌ๋ํธ๋ฅผ ๋ฐํํฉ๋๋ค. ์ผ๋ฐ ํจ์๋ก ์ ์๋ React ์ปดํฌ๋ํธ์ ๋ค๋ฅด๊ฒ `forwardRef` ์ ์ํด ๋ฐํ๋๋ ์ปดํฌ๋ํธ๋ `ref` prop๋ฅผ ๋ฐ์ ์ ์์ต๋๋ค.
+`forwardRef`๋ JSX์์ ๋ ๋๋งํ ์ ์๋ React ์ปดํฌ๋ํธ๋ฅผ ๋ฐํํฉ๋๋ค. ์ผ๋ฐ ํจ์๋ก ์ ์๋ React ์ปดํฌ๋ํธ์ ๋ค๋ฅด๊ฒ `forwardRef`์ ์ํด ๋ฐํ๋๋ ์ปดํฌ๋ํธ๋ `ref` Prop๋ฅผ ๋ฐ์ ์ ์์ต๋๋ค.
---
@@ -86,7 +86,7 @@ const MyInput = forwardRef(function MyInput(props, ref) {
### ๋ถ๋ชจ ์ปดํฌ๋ํธ์ DOM ๋
ธ๋ ๋
ธ์ถํ๊ธฐ {/*exposing-a-dom-node-to-the-parent-component*/}
-๊ธฐ๋ณธ์ ์ผ๋ก ๊ฐ ์ปดํฌ๋ํธ์ DOM ๋
ธ๋๋ ๋น๊ณต๊ฐ์
๋๋ค. ๊ทธ๋ฌ๋ ๋๋ก๋ ๋ถ๋ชจ์ DOM ๋
ธ๋๋ฅผ ๋
ธ์ถํ๋ ๊ฒ์ด ์ ์ฉํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด focus ํ๊ธฐ ์ํด ๋
ธ์ถํ ์ ์์ต๋๋ค. ์ด๋ฅผ ์ํด ์ปดํฌ๋ํธ ์ ์๋ฅผ `forwardRef()`๋ก ๊ฐ์ธ์ฃผ๋ฉด ๋ฉ๋๋ค.
+๊ธฐ๋ณธ์ ์ผ๋ก ๊ฐ ์ปดํฌ๋ํธ์ DOM ๋
ธ๋๋ ๋น๊ณต๊ฐ์
๋๋ค. ๊ทธ๋ฌ๋ ๋๋ก๋ ๋ถ๋ชจ์ DOM ๋
ธ๋๋ฅผ ๋
ธ์ถํ๋ ๊ฒ์ด ์ ์ฉํ ์ ์์ต๋๋ค. ์๋ฅผ ๋ค์ด ํฌ์ปค์คFocus ํ๊ธฐ ์ํด ๋
ธ์ถํ ์ ์์ต๋๋ค. ์ด๋ฅผ ์ํด ์ปดํฌ๋ํธ ์ ์๋ฅผ `forwardRef()`๋ก ๊ฐ์ธ์ฃผ๋ฉด ๋ฉ๋๋ค.
```js {3,11}
import { forwardRef } from 'react';
@@ -102,7 +102,7 @@ const MyInput = forwardRef(function MyInput(props, ref) {
});
```
-props ๋ค์์ ๋ ๋ฒ์งธ ์ธ์๋ก ref๋ฅผ ๋ฐ๊ฒ ๋ฉ๋๋ค. ๋
ธ์ถํ๋ ค๋ DOM ๋
ธ๋์ ์ด๋ฅผ ์ ๋ฌํฉ๋๋ค.
+`props` ๋ค์์ ๋ ๋ฒ์งธ ์ธ์๋ก ref๋ฅผ ๋ฐ๊ฒ ๋ฉ๋๋ค. ๋
ธ์ถํ๋ ค๋ DOM ๋
ธ๋์ ์ด๋ฅผ ์ ๋ฌํฉ๋๋ค.
```js {8} [[1, 3, "ref"], [1, 8, "ref", 30]]
import { forwardRef } from 'react';
@@ -139,15 +139,15 @@ function Form() {
}
```
-์ด `Form` ์ปดํฌ๋ํธ๋ `MyInput` ์๊ฒ [ref๋ฅผ ์ ๋ฌ](/reference/react/useRef#manipulating-the-dom-with-a-ref)ํฉ๋๋ค. `MyInput` ์ปดํฌ๋ํธ๋ ํด๋น ref๋ฅผ `` ํ๊ทธ์ ์ ๋ฌํฉ๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก `Form` ์ปดํฌ๋ํธ๋ ํด๋น `` DOM ๋
ธ๋์ ์ ๊ทผํ์ฌ [`focus()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus)๋ฅผ ํธ์ถํ ์ ์์ต๋๋ค.
+์ด `Form` ์ปดํฌ๋ํธ๋ `MyInput` ์๊ฒ [Ref๋ฅผ ์ ๋ฌ](/reference/react/useRef#manipulating-the-dom-with-a-ref)ํฉ๋๋ค. `MyInput` ์ปดํฌ๋ํธ๋ ํด๋น Ref๋ฅผ `` ํ๊ทธ์ ์ ๋ฌํฉ๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก `Form` ์ปดํฌ๋ํธ๋ ํด๋น `` DOM ๋
ธ๋์ ์ ๊ทผํ์ฌ [`focus()`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus)๋ฅผ ํธ์ถํ ์ ์์ต๋๋ค.
-์ปดํฌ๋ํธ ๋ด๋ถ์ DOM ๋
ธ๋์ ref๋ฅผ ๋
ธ์ถํ๋ฉด ๋์ค์ ์ปดํฌ๋ํธ์ ๋ด๋ถ๋ฅผ ๋ณ๊ฒฝํ๊ธฐ๊ฐ ๋ ์ด๋ ค์์ง๋ค๋ ์ ์ ์ ์ํ์ธ์. ์ผ๋ฐ์ ์ผ๋ก ๋ฒํผ์ด๋ ํ
์คํธ input๊ณผ ๊ฐ์ด ์ฌ์ฌ์ฉํ ์ ์๋ ์ ์์ค ์ปดํฌ๋ํธ์์ DOM ๋
ธ๋๋ฅผ ๋
ธ์ถํ์ง๋ง, ์๋ฐํ๋ ๋๊ธ ๊ฐ์ ์ ํ๋ฆฌ์ผ์ด์
๋ ๋ฒจ์ ์ปดํฌ๋ํธ์์๋ ๋
ธ์ถํ๊ณ ์ถ์ง ์์ ๊ฒ์
๋๋ค.
+์ปดํฌ๋ํธ ๋ด๋ถ DOM ๋
ธ๋์ Ref๋ฅผ ๋
ธ์ถํ๋ฉด ๋์ค์ ์ปดํฌ๋ํธ์ ๋ด๋ถ๋ฅผ ๋ณ๊ฒฝํ๊ธฐ๊ฐ ๋ ์ด๋ ค์์ง๋ค๋ ์ ์ ์ ์ํ์ธ์. ์ผ๋ฐ์ ์ผ๋ก ๋ฒํผ์ด๋ ํ
์คํธ Input๊ณผ ๊ฐ์ด ์ฌ์ฌ์ฉํ ์ ์๋ ์ ์์ค ์ปดํฌ๋ํธ์์ DOM ๋
ธ๋๋ฅผ ๋
ธ์ถํ์ง๋ง, ์๋ฐํ๋ ๋๊ธ ๊ฐ์ ์ ํ๋ฆฌ์ผ์ด์
๋ ๋ฒจ์ ์ปดํฌ๋ํธ์์๋ ๋
ธ์ถํ๊ณ ์ถ์ง ์์ ๊ฒ์
๋๋ค.
-#### ํ
์คํธ input์ ์ด์ ๋ง์ถ๊ธฐ {/*focusing-a-text-input*/}
+#### ํ
์คํธ Input์ ์ด์ ๋ง์ถ๊ธฐ {/*focusing-a-text-input*/}
-๋ฒํผ์ ํด๋ฆญํ๋ฉด input์ ํฌ์ปค์ค ๋ฉ๋๋ค. `Form` ์ปดํฌ๋ํธ๋ ref๋ฅผ ์ ์ํ๊ณ ์ด๋ฅผ `MyInput` ์ปดํฌ๋ํธ๋ก ์ ๋ฌํฉ๋๋ค. `MyInput` ์ปดํฌ๋ํธ๋ ํด๋น ref๋ฅผ `input`์ผ๋ก ์ ๋ฌํฉ๋๋ค. ์ด๋ ๊ฒ ํ๋ฉด `Form` ์ปดํฌ๋ํธ๊ฐ `input`์ ํฌ์ปค์ค๋ฅผ ์ค ์ ์์ต๋๋ค.
+๋ฒํผ์ ํด๋ฆญํ๋ฉด Input์ ํฌ์ปค์ค๋ฉ๋๋ค. `Form` ์ปดํฌ๋ํธ๋ Ref๋ฅผ ์ ์ํ๊ณ ์ด๋ฅผ `MyInput` ์ปดํฌ๋ํธ๋ก ์ ๋ฌํฉ๋๋ค. `MyInput` ์ปดํฌ๋ํธ๋ ํด๋น Ref๋ฅผ `input`์ผ๋ก ์ ๋ฌํฉ๋๋ค. ์ด๋ ๊ฒ ํ๋ฉด `Form` ์ปดํฌ๋ํธ๊ฐ `input`์ ํฌ์ปค์ค๋ฅผ ์ค ์ ์์ต๋๋ค.
@@ -201,7 +201,7 @@ input {
#### ๋น๋์ค ์ฌ์ ๋ฐ ์ ์งํ๊ธฐ {/*playing-and-pausing-a-video*/}
-๋ฒํผ์ ํด๋ฆญํ๋ฉด `