From cea2176377a00175ab9d7c92d61ff22f834f5d8a Mon Sep 17 00:00:00 2001 From: Younsang Na <77400131+nayounsang@users.noreply.github.com> Date: Thu, 19 Jun 2025 01:11:33 +0900 Subject: [PATCH 001/368] docs: translate react complier (#1216) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # React Compiler 번역 안된 파트 추가 번역 close #1209 - React 컴파일러에서 번역이 안된 섹션들을 추가 번역 ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --------- Co-authored-by: 루밀LuMir --- src/content/learn/react-compiler.md | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/content/learn/react-compiler.md b/src/content/learn/react-compiler.md index e85edda38..be0b2c575 100644 --- a/src/content/learn/react-compiler.md +++ b/src/content/learn/react-compiler.md @@ -18,7 +18,7 @@ title: React 컴파일러 React 컴파일러는 커뮤니티로부터 초기 피드백을 받기 위해 RCRelease Candidate 버전으로 오픈소스화한 새로운 컴파일러입니다. 이제 모든 분께 이 컴파일러를 사용해 보고 피드백을 제공할 것을 권장합니다. -The latest RC release can be found with the `@rc` tag, and daily experimental releases with `@experimental`. +최신 RC 릴리스는 `@rc` 태그로 찾을 수 있고, 일일 실험적 릴리스는 `@experimental`로 찾을 수 있습니다. React 컴파일러는 커뮤니티로부터 초기 피드백을 받기 위해 오픈소스화한 새로운 컴파일러입니다. React 컴파일러는 빌드 타임 전용 도구로 React 앱을 자동으로 최적화합니다. 순수 자바스크립트로 동작하며, [React의 규칙](/reference/rules)을 이해하므로 코드를 다시 작성할 필요가 없습니다. @@ -31,13 +31,13 @@ React 컴파일러는 커뮤니티로부터 초기 피드백을 받기 위해 {`npm install -D babel-plugin-react-compiler@rc eslint-plugin-react-hooks@^6.0.0-rc.1`} -Or, if you're using Yarn: +또는, Yarn을 사용한다면 아래 명령어를 실행해주세요. {`yarn add -D babel-plugin-react-compiler@rc eslint-plugin-react-hooks@^6.0.0-rc.1`} -If you are not using React 19 yet, please see [the section below](#using-react-compiler-with-react-17-or-18) for further instructions. +React 19를 아직 사용하지 않는다면, 추가 지침을 위해 [아래 섹션](#using-react-compiler-with-react-17-or-18)을 확인하세요. ### 컴파일러는 무엇을 하나요? {/*what-does-the-compiler-do*/} @@ -46,7 +46,7 @@ React 컴파일러는 애플리케이션을 최적화하기 위해 코드를 자 컴파일러는 자바스크립트와 React의 규칙에 대한 지식을 활용하여 자동으로 컴포넌트와 Hook 내부의 값 또는 값 그룹을 메모이제이션 합니다. 규칙 위반을 감지할 경우 해당 컴포넌트 또는 Hook을 건너뛰고 다른 코드를 안전하게 컴파일합니다. -React Compiler can statically detect when Rules of React are broken, and safely opt-out of optimizing just the affected components or hooks. It is not necessary for the compiler to optimize 100% of your codebase. +React 컴파일러는 React의 규칙 위반을 정적으로 감지할 수 있으며, 영향을 받는 컴포넌트나 Hook만 안전하게 최적화에서 제외할 수 있습니다. 컴파일러가 코드베이스의 100%를 최적화할 필요는 없습니다. 이미 코드베이스에 메모이제이션이 잘 되어 있다면, 컴파일러를 통해 주요 성능 향상을 기대하기 어려울 수 있습니다. 그러나 실제로 성능 문제를 일으키는 올바른 의존성dependencies을 메모이제이션 하는 것은 직접 처리하기 까다로울 수 있습니다. @@ -123,13 +123,13 @@ function TableContainer({ items }) { ### `eslint-plugin-react-hooks` 설치 {/*installing-eslint-plugin-react-compiler*/} -React Compiler also powers an ESLint plugin. You can try it out by installing `eslint-plugin-react-hooks@^6.0.0-rc.1`. +React 컴파일러는 ESLint 플러그인도 제공합니다. `eslint-plugin-react-hooks@^6.0.0-rc.1`을 설치해서 시도해보세요. {`npm install -D eslint-plugin-react-hooks@^6.0.0-rc.1`} -See our [editor setup](/learn/editor-setup#linting) guide for more details. +자세한 정보를 위해 [에디터 설정하기](/learn/editor-setup#linting) 가이드를 확인하세요. ESLint 플러그인은 에디터에서 React의 규칙 위반 사항을 표시합니다. 이 경우 컴파일러가 해당 컴포넌트나 Hook의 최적화를 건너뛰었음을 의미합니다. 이것은 완전히 정상적인 동작이며, 컴파일러는 이를 복구하고 코드베이스의 다른 컴포넌트를 계속해서 최적화할 수 있습니다. @@ -159,15 +159,15 @@ const ReactCompilerConfig = { 새 프로젝트를 시작할 경우, 기본 동작으로 전체 코드베이스에서 컴파일러를 활성화할 수 있습니다. -### Using React Compiler with React 17 or 18 {/*using-react-compiler-with-react-17-or-18*/} +### React 17 또는 18에서 컴파일러 사용 {/*using-react-compiler-with-react-17-or-18*/} -React Compiler works best with React 19 RC. If you are unable to upgrade, you can install the extra `react-compiler-runtime` package which will allow the compiled code to run on versions prior to 19. However, note that the minimum supported version is 17. +React 컴파일러는 React 19 RC에서 최적의 성능을 발휘합니다. 업그레이드가 불가능하다면 `react-compiler-runtime` 패키지를 추가 설치해 컴파일된 코드를 19 이전 버전에서도 실행할 수 있습니다. 단, 최소 지원 버전은 17입니다. {`npm install react-compiler-runtime@rc`} -You should also add the correct `target` to your compiler config, where `target` is the major version of React you are targeting: +컴파일러 설정에 올바른 `target`을 추가해야 하며, `target`은 대상으로 하는 React의 메이저 버전입니다. ```js {3} // babel.config.js @@ -184,17 +184,17 @@ module.exports = function () { }; ``` -### Using the compiler on libraries {/*using-the-compiler-on-libraries*/} +### 라이브러리에서 컴파일러 사용 {/*using-the-compiler-on-libraries*/} -React Compiler can also be used to compile libraries. Because React Compiler needs to run on the original source code prior to any code transformations, it is not possible for an application's build pipeline to compile the libraries they use. Hence, our recommendation is for library maintainers to independently compile and test their libraries with the compiler, and ship compiled code to npm. +React 컴파일러는 라이브러리 컴파일에도 사용할 수 있습니다. React 컴파일러는 코드 변환 이전의 원본 소스 코드에서 실행되어야 하기 때문에, 애플리케이션의 빌드 파이프라인으로는 사용하는 라이브러리를 컴파일할 수 없습니다. 따라서, 라이브러리 유지보수자가 컴파일러로 라이브러리를 독립적으로 컴파일하고 테스트한 후, 컴파일된 코드를 npm에 배포하는 것을 권장합니다. -Because your code is pre-compiled, users of your library will not need to have the compiler enabled in order to benefit from the automatic memoization applied to your library. If your library targets apps not yet on React 19, specify a minimum [`target` and add `react-compiler-runtime` as a direct dependency](#using-react-compiler-with-react-17-or-18). The runtime package will use the correct implementation of APIs depending on the application's version, and polyfill the missing APIs if necessary. +코드가 사전 컴파일되기 때문에, 라이브러리 사용자들은 라이브러리에 적용된 자동 메모이제이션의 이점을 얻기 위해 컴파일러를 활성화할 필요가 없습니다. 라이브러리가 아직 React 19 버전이 아닌 앱을 대상으로 한다면, 최소 [`target`을 설정하고 `react-compiler-runtime`을 직접 의존성으로 추가하세요](#using-react-compiler-with-react-17-or-18). 런타임 패키지는 애플리케이션 버전에 따라 올바른 API 구현을 사용하며, 필요한 경우 누락된 API를 폴리필합니다. -Library code can often require more complex patterns and usage of escape hatches. For this reason, we recommend ensuring that you have sufficient testing in order to identify any issues that might arise from using the compiler on your library. If you identify any issues, you can always opt-out the specific components or hooks with the [`'use no memo'` directive](#something-is-not-working-after-compilation). +라이브러리 코드는 종종 더 복잡한 패턴과 탈출구 사용이 필요할 수 있습니다. 이런 이유로, 라이브러리에 컴파일러를 적용할 때 발생할 수 있는 문제를 발견하기 위해 충분한 테스트를 갖추는 것을 권장합니다. 문제를 발견하면, 해당 컴포넌트나 훅을 [`'use no memo'` 지시어](#something-is-not-working-after-compilation)를 통해 언제든 제외할 수 있습니다. -Similarly to apps, it is not necessary to fully compile 100% of your components or hooks to see benefits in your library. A good starting point might be to identify the most performance sensitive parts of your library and ensuring that they don't break the [Rules of React](/reference/rules), which you can use `eslint-plugin-react-compiler` to identify. +앱과 비슷하게, 라이브러리에서 이점을 보기 위해 모든 컴포넌트나 훅을 100% 컴파일할 필요는 없습니다. 좋은 시작점은 라이브러리에서 성능에 민감한 부분을 파악하고 해당 부분이 [React의 규칙](/reference/rules)을 위반하지 않는지 확인하는 것입니다. 이는 `eslint-plugin-react-compiler`를 통해 파악할 수 있습니다. -## Usage {/*installation*/} +## 사용법 {/*installation*/} ### Babel {/*usage-with-babel*/} @@ -248,7 +248,7 @@ export default defineConfig(() => { ### Next.js {/*usage-with-nextjs*/} -Please refer to the [Next.js docs](https://nextjs.org/docs/app/api-reference/next-config-js/reactCompiler) for more information. +자세한 정보를 위해 [Next.js 문서](https://nextjs.org/docs/app/api-reference/next-config-js/reactCompiler)를 확인하세요. ### Remix {/*usage-with-remix*/} `vite-plugin-babel`을 설치하고 컴파일러의 Babel 플러그인을 추가하세요. @@ -281,11 +281,11 @@ export default defineConfig({ ### Webpack {/*usage-with-webpack*/} -A community webpack loader is [now available here](https://github.com/SukkaW/react-compiler-webpack). +커뮤니티 webpack 로더가 [이제 여기에서 사용 가능합니다](https://github.com/SukkaW/react-compiler-webpack). ### Expo {/*usage-with-expo*/} -Please refer to [Expo's docs](https://docs.expo.dev/guides/react-compiler/) to enable and use the React Compiler in Expo apps. +Expo 앱에서 React 컴파일러를 활성화하고 사용하려면 [Expo 문서](https://docs.expo.dev/guides/react-compiler/)를 확인하세요. ### Metro (React Native) {/*usage-with-react-native-metro*/} From 974cf3b049d45fd69ec4d680043b510d2678715b Mon Sep 17 00:00:00 2001 From: wonza-hub <70367717+wonza-hub@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:17:00 +0900 Subject: [PATCH 002/368] docs: improve sentences for more natural phrasing (#1218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 어색하게 직역된 문장 의역 [Ref와 State의 차이#자세히 살펴보기: useRef는 내부적으로 어떻게 동작하나요?](https://ko.react.dev/learn/referencing-values-with-refs#differences-between-refs-and-state) 부분을 아래와 같이 수정했습니다. 이때, 독자 입장에서 더 읽기 편하게 하는 데 중점을 두었습니다. ``` - 이 예시에서는 State Setter가 어떻게 사용되지 않는지 주의하세요. + 이 예시에서는 State Setter를 사용하지 않는 점에 주목하세요. ``` [원문](https://react.dev/learn/referencing-values-with-refs#differences-between-refs-and-state)에는 'Note how the state setter is unused in this example.'라고 표현합니다. 코드와 설명의 앞뒤 맥락을 보면, 'useRef는 항상 동일한 객체를 반환해야 하므로 state setter가 필요하지 않다.'라는 것을 전달하려는 목적으로 보입니다. 따라서 'how'를 '어떻게'로 직역하는 대신, state setter를 사용하지 않는 '현상' 자체에 대한 뉘앙스가 담기게 의역해보았습니다. 더불어, 이런 뉘앙스에는 '주의'보다는 '주목'이 의미 전달에 더 적합하다고 판단했습니다. (* [note 뜻 - 네이버 사전](https://en.dict.naver.com/#/entry/enko/775deb835c894f519a6912a545c24f64)) ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --------- Co-authored-by: 루밀LuMir --- src/content/learn/referencing-values-with-refs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/referencing-values-with-refs.md b/src/content/learn/referencing-values-with-refs.md index f443ac58f..532cc151f 100644 --- a/src/content/learn/referencing-values-with-refs.md +++ b/src/content/learn/referencing-values-with-refs.md @@ -248,7 +248,7 @@ function useRef(initialValue) { } ``` -첫 번째 렌더링 중에 `useRef`는 `{ current: initialValue }`을 반환합니다. 이 객체는 React에 의해 저장되므로 다음 렌더링 중에 같은 객체가 반환됩니다. 이 예시에서는 State Setter가 어떻게 사용되지 않는지 주의하세요. `useRef`는 항상 동일한 객체를 반환해야 하므로 필요하지 않습니다! +첫 번째 렌더링 중에 `useRef`는 `{ current: initialValue }`를 반환합니다. 이 객체는 React에 의해 저장되므로 다음 렌더링 중에 같은 객체를 반환합니다. 이 예시에서는 State Setter를 사용하지 않는 점에 주목하세요. `useRef`는 항상 동일한 객체를 반환해야 하므로 필요하지 않습니다! React는 `useRef`가 실제로 충분히 일반적이기 때문에 built-in 버전을 제공합니다. setter가 없는 일반적인 state 변수라고 생각할 수 있습니다. 객체 지향 프로그래밍에 익숙하다면 Ref는 인스턴스 필드를 상기시킬 수 있습니다. 하지만 `this.something` 대신에 `somethingRef.current` 처럼 써야합니다. From 57d55aa493d29ae0dad5aa8faed6114349d81cf4 Mon Sep 17 00:00:00 2001 From: wonza-hub <70367717+wonza-hub@users.noreply.github.com> Date: Fri, 20 Jun 2025 21:20:31 +0900 Subject: [PATCH 003/368] docs: fix typo in referencing-values-with-refs.md (#1217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 문장의 의미 불일치 수정 '챌린지 4 of 4: 최신 state 읽기' 中 정답보기 클릭 시 보이는 해설이 원문과 일치하지 않는 부분이 있어 수정했습니다. ```md - current 텍스트는 렌더링에도 사용되므로, 이 예에서는 state 변수(렌더링을 위한) 둘 다와 ref(시간 초과 시 읽음)가 필요합니다. + current 텍스트는 렌더링에도 사용되므로, 이 예에서는 state 변수(렌더링을 위한)와 ref(시간 초과 시 읽음) 둘 다 필요합니다. ``` * 원문 https://react.dev/learn/referencing-values-with-refs#challenges * 번역 https://ko.react.dev/learn/referencing-values-with-refs#challenges ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews Co-authored-by: 루밀LuMir --- src/content/learn/referencing-values-with-refs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/referencing-values-with-refs.md b/src/content/learn/referencing-values-with-refs.md index 532cc151f..e29afdacb 100644 --- a/src/content/learn/referencing-values-with-refs.md +++ b/src/content/learn/referencing-values-with-refs.md @@ -616,7 +616,7 @@ export default function Chat() { -state는 [snapshot 처럼](/learn/state-as-a-snapshot) 작동하므로 타임아웃과 같은 비동기 작업에서 최신 state를 읽을 수 없습니다. 그러나 최신 입력 텍스트를 ref에 유지할 수 있습니다. ref는 변경할 수 있으므로 언제든지 `current` 프로퍼티를 읽을 수 있습니다. current 텍스트는 렌더링에도 사용되므로, 이 예에서는 state 변수(렌더링을 위한) *둘 다*와 ref(시간 초과 시 읽음)가 필요합니다. current ref를 수동으로 업데이트해야 합니다. +state는 [snapshot 처럼](/learn/state-as-a-snapshot) 작동하므로 타임아웃과 같은 비동기 작업에서 최신 state를 읽을 수 없습니다. 그러나 최신 입력 텍스트를 ref에 유지할 수 있습니다. ref는 변경할 수 있으므로 언제든지 `current` 프로퍼티를 읽을 수 있습니다. current 텍스트는 렌더링에도 사용되므로, 이 예에서는 state 변수(렌더링을 위한)와 ref(시간 초과 시 읽음) *둘 다* 필요합니다. current ref를 수동으로 업데이트해야 합니다. From e8bdbb38a5e20517931d06f2f869486f6be84346 Mon Sep 17 00:00:00 2001 From: wonza-hub <70367717+wonza-hub@users.noreply.github.com> Date: Sat, 21 Jun 2025 00:55:10 +0900 Subject: [PATCH 004/368] docs: add a missing translation (#1219) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 누락된 번역 추가 'Ref로 DOM 조작하기' 페이지의 [챌린지 4 of 4: 별개의 컴포넌트에서 검색 필드에 포커스 이동하기](https://ko.react.dev/learn/manipulating-the-dom-with-refs#challenges) 내 '힌트 보기' 클릭 시 표시되는 설명을 수정했습니다. 해당 부분에 오래된 설명(한국어)과 원문의 최신 설명(영어)이 공존하는 것으로 보입니다. ※ [React 19 버전 이후, forwardRef는 deprecated됨](https://ko.react.dev/reference/react/forwardRef) 오래된 설명(한국어)을 제외하고 원문의 최신 설명(영어)을 적절히 번역하여, 다음과 같이 수정할 것을 제안합니다. ``` - `SearchInput`같은 컴포넌트에서 `forwardRef`를 사용해서 DOM 노드를 노출할 필요가 있습니다. + `SearchInput` 같은 컴포넌트에서 DOM 노드를 노출하려면 `ref`를 prop 처럼 전달해야 합니다. ``` ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --------- Co-authored-by: 루밀LuMir --- src/content/learn/manipulating-the-dom-with-refs.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/learn/manipulating-the-dom-with-refs.md b/src/content/learn/manipulating-the-dom-with-refs.md index 2abc2e795..e85b4bc1b 100644 --- a/src/content/learn/manipulating-the-dom-with-refs.md +++ b/src/content/learn/manipulating-the-dom-with-refs.md @@ -1059,9 +1059,7 @@ img { -`SearchInput`같은 컴포넌트에서 `forwardRef`를 사용해서 DOM 노드를 노출할 필요가 있습니다. - -You'll need to pass `ref` as a prop to opt into exposing a DOM node from your own component like `SearchInput`. +`SearchInput` 같은 컴포넌트에서 DOM 노드를 노출하려면 `ref`를 Prop처럼 전달해야 합니다. From 2ee4cb09ae780677668765044679687ffbe2d0d6 Mon Sep 17 00:00:00 2001 From: wonza-hub <70367717+wonza-hub@users.noreply.github.com> Date: Sat, 21 Jun 2025 02:08:28 +0900 Subject: [PATCH 005/368] docs: fix typo in reusing-logic-with-custom-hooks.md (#1220) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 어법 수정 과거를 나타내는 어미인 '-던가'보다 어떤 것을 선택할 때나 아무런 상관이 없음을 나타내는 '-든가'가 더 적절해 보입니다. [국립국어원: ‘~든가’와 ‘~던가’의 차이(2024.11)](https://www.korean.go.kr/front/onlineQna/onlineQnaView.do?mn_id=216&qna_seq=306072) [중앙일보: [우리말 바루기] '-던가'와 '-든가'(2003.06)](https://www.joongang.co.kr/article/188521) ``` - 예를 들어, 데이터를 가져온다던가, 사용자가 온라인 상태인지 계속 확인한다던가,... + 예를 들어, 데이터를 가져온다든가, 사용자가 온라인 상태인지 계속 확인한다든가,... ``` ## 필수 확인 사항 - [X] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [X] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [X] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [X] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [X] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [X] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [X] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --- src/content/learn/reusing-logic-with-custom-hooks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/learn/reusing-logic-with-custom-hooks.md b/src/content/learn/reusing-logic-with-custom-hooks.md index 93e865b96..1870be649 100644 --- a/src/content/learn/reusing-logic-with-custom-hooks.md +++ b/src/content/learn/reusing-logic-with-custom-hooks.md @@ -4,7 +4,7 @@ title: 커스텀 Hook으로 로직 재사용하기 -React는 `useState`, `useContext`, 그리고 `useEffect`같이 몇몇 내재하고 있는 Hook이 존재합니다. 가끔 조금 더 구체적인 목적을 가진 Hook이 존재하길 바랄 때도 있을 겁니다. 예를 들어, 데이터를 가져온다던가, 사용자가 온라인 상태인지 계속 확인한다던가, 혹은 채팅방에 연결하기 위한 목적들처럼요. React에서 다음과 같은 Hook들을 찾기는 어려울 것입니다. 하지만 애플리케이션의 필요에 알맞은 본인만의 Hook을 만들 수 있습니다. +React는 `useState`, `useContext`, 그리고 `useEffect`같이 몇몇 내재하고 있는 Hook이 존재합니다. 가끔 조금 더 구체적인 목적을 가진 Hook이 존재하길 바랄 때도 있을 겁니다. 예를 들어, 데이터를 가져온다든가, 사용자가 온라인 상태인지 계속 확인한다든가, 혹은 채팅방에 연결하기 위한 목적들처럼요. React에서 다음과 같은 Hook들을 찾기는 어려울 것입니다. 하지만 애플리케이션의 필요에 알맞은 본인만의 Hook을 만들 수 있습니다. @@ -1096,7 +1096,7 @@ button { margin-left: 10px; } 모든 자잘한 중복되는 코드들까지 커스텀 Hook으로 분리할 필요가 없습니다. 어떤 중복된 코드는 괜찮습니다. 예를 들어, 앞선 예시처럼 하나의 `useState`를 감싸기 위한 `useFormInput`을 분리하는 것은 불필요합니다. -하지만 Effect를 사용하든 사용하지 않든, 커스텀 Hook 안에 그것을 감싸는 게 좋은지 아닌지 고려하세요. [Effect를 자주 쓸 필요가 없을지 모릅니다.](/learn/you-might-not-need-an-effect) 만약 Effect를 사용한다면, 그건 외부 시스템과 동기화한다던가 React가 내장하지 않은 API를 위해 무언가를 하는 등 "React에서 벗어나기" 위함일 겁니다. 커스텀 Hook으로 감싸는 것은 목적을 정확하게 전달하고 어떻게 데이터가 그것을 통해 흐르는지 알 수 있게 해줍니다. +하지만 Effect를 사용하든 사용하지 않든, 커스텀 Hook 안에 그것을 감싸는 게 좋은지 아닌지 고려하세요. [Effect를 자주 쓸 필요가 없을지 모릅니다.](/learn/you-might-not-need-an-effect) 만약 Effect를 사용한다면, 그건 외부 시스템과 동기화한다든가 React가 내장하지 않은 API를 위해 무언가를 하는 등 "React에서 벗어나기" 위함일 겁니다. 커스텀 Hook으로 감싸는 것은 목적을 정확하게 전달하고 어떻게 데이터가 그것을 통해 흐르는지 알 수 있게 해줍니다. 예를 들어 두 가지 목록을 보여주는 `ShippingForm` 컴포넌트를 살펴봅시다. 하나는 도시의 목록을 보여주고, 다른 하나는 선택된 도시의 구역 목록을 보여줍니다. 아마 코드를 다음과 같이 작성하기 시작할 겁니다. From 91f8e5aa84043b76b56b941abfae9cce7a177b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=98=B8=EC=9D=B4=EC=B4=88=EC=9D=B4?= <110888511+hoyyChoi@users.noreply.github.com> Date: Sat, 28 Jun 2025 00:19:08 +0900 Subject: [PATCH 006/368] docs: remove duplicated Recap in manipulating-the-dom-with-refs.md (#1221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 중복된 요약 내용 제거 [Ref로 DOM 조작하기](https://ko.react.dev/learn/manipulating-the-dom-with-refs#recap) 문서의 요약 파트에 중복된 문장이 있어 이를 제거하였습니다. **수정 전** ``` - Ref는 범용적인 개념이지만 많은 경우 DOM 요소를 참조하기 위해 사용합니다. - `
`로 React가 myRef.current에 DOM Node를 대입하도록 지시할 수 있습니다. - 많은 경우 ref는 포커싱, 스크롤링, DOM 요소 크기 혹은 위치 측정 등 비 파괴적인 행동을 위해 사용됩니다. - 컴포넌트는 기본적으로 DOM 노드를 노출하지 않습니다. `forwardRef`와 두 번째 `ref` 인자를 특정 노드에 전달하는 것으로 선택적으로 노출할 수 있습니다. - React가 관리하는 DOM 노드를 직접 바꾸려 하지 마세요. - React가 관리하는 DOM 노드를 수정하려 한다면, React가 변경할 이유가 없는 부분만 수정하세요. - Ref는 일반적인 개념이지만, 대부분의 경우 DOM 요소를 저장하는 데 사용됩니다. - React에 `
`와 같이 작성하면, 해당 DOM 노드를 `myRef.current`에 넣도록 지시하는 것입니다. - 보통 ref는 DOM 요소에 포커스를 주거나, 스크롤하거나, 치수를 측정하는 등 DOM을 직접 변경하지 않고 상태를 유지하는 작업에 사용합니다. - 컴포넌트는 기본적으로 자신의 DOM 노드를 외부에 노출하지 않습니다. `ref` prop을 사용하여 DOM 노드를 노출하도록 선택할 수 있습니다. - React가 관리하는 DOM 노드를 직접 변경하는 것은 피하세요. - 꼭 React가 관리하는 DOM 노드를 수정해야 한다면, React가 업데이트할 이유가 없는 부분만 수정해야 합니다. ``` **수정 후** ``` - Ref는 일반적인 개념이지만, 대부분의 경우 DOM 요소를 저장하는 데 사용됩니다. - React에 `
`와 같이 작성하면, 해당 DOM 노드를 `myRef.current`에 넣도록 지시하는 것입니다. - 보통 ref는 DOM 요소에 포커스를 주거나, 스크롤하거나, 치수를 측정하는 등 DOM을 직접 변경하지 않고 상태를 유지하는 작업에 사용합니다. - 컴포넌트는 기본적으로 자신의 DOM 노드를 외부에 노출하지 않습니다. `ref` prop을 사용하여 DOM 노드를 노출하도록 선택할 수 있습니다. - React가 관리하는 DOM 노드를 직접 변경하는 것은 피하세요. - 꼭 React가 관리하는 DOM 노드를 수정해야 한다면, React가 업데이트할 이유가 없는 부분만 수정해야 합니다. ``` ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --------- Co-authored-by: 루밀LuMir --- .../learn/manipulating-the-dom-with-refs.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/content/learn/manipulating-the-dom-with-refs.md b/src/content/learn/manipulating-the-dom-with-refs.md index e85b4bc1b..5f4201ff6 100644 --- a/src/content/learn/manipulating-the-dom-with-refs.md +++ b/src/content/learn/manipulating-the-dom-with-refs.md @@ -649,19 +649,12 @@ DOM 요소를 직접 삭제한 뒤 `setState`를 사용하여 다시 DOM 노드 -- Ref는 범용적인 개념이지만 많은 경우 DOM 요소를 참조하기 위해 사용합니다. -- `
`로 React가 myRef.current에 DOM Node를 대입하도록 지시할 수 있습니다. -- 많은 경우 ref는 포커싱, 스크롤링, DOM 요소 크기 혹은 위치 측정 등 비 파괴적인 행동을 위해 사용됩니다. -- 컴포넌트는 기본적으로 DOM 노드를 노출하지 않습니다. `forwardRef`와 두 번째 `ref` 인자를 특정 노드에 전달하는 것으로 선택적으로 노출할 수 있습니다. -- React가 관리하는 DOM 노드를 직접 바꾸려 하지 마세요. -- React가 관리하는 DOM 노드를 수정하려 한다면, React가 변경할 이유가 없는 부분만 수정하세요. - -- Ref는 일반적인 개념이지만, 대부분의 경우 DOM 요소를 저장하는 데 사용됩니다. +- Ref는 일반적인 개념이지만, 대부분의 경우 DOM 요소를 저장하는 데 사용합니다. - React에 `
`와 같이 작성하면, 해당 DOM 노드를 `myRef.current`에 넣도록 지시하는 것입니다. -- 보통 ref는 DOM 요소에 포커스를 주거나, 스크롤하거나, 치수를 측정하는 등 DOM을 직접 변경하지 않고 상태를 유지하는 작업에 사용합니다. -- 컴포넌트는 기본적으로 자신의 DOM 노드를 외부에 노출하지 않습니다. `ref` prop을 사용하여 DOM 노드를 노출하도록 선택할 수 있습니다. +- 대부분의 경우, Ref는 DOM 요소에 포커스를 주거나, 스크롤하거나, 치수를 측정하는 등 DOM을 직접 변경하지 않고 상태를 유지하는 작업에 사용합니다. +- 컴포넌트는 기본적으로 자신의 DOM 노드를 외부에 노출하지 않습니다. `ref` Prop을 사용하여 DOM 노드를 선택적으로 노출할 수 있습니다. - React가 관리하는 DOM 노드를 직접 변경하는 것은 피하세요. -- 꼭 React가 관리하는 DOM 노드를 수정해야 한다면, React가 업데이트할 이유가 없는 부분만 수정해야 합니다. +- 불가피하게 React가 관리하는 DOM 노드를 수정해야 한다면, React가 업데이트할 이유가 없는 부분만 수정해야 합니다. From 9698d16d7568701db6ca10a4c811ff0d9579a5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=88=98=EC=97=B0=20=28SooYeon=20Choi=29?= <87463004+sooyeoniya@users.noreply.github.com> Date: Sat, 28 Jun 2025 18:14:37 +0900 Subject: [PATCH 007/368] docs: fix typo in scaling-up-with-reducer-and-context.md (#1222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 오타 수정 안녕하세요. [Reducer와 Context로 앱 확장하기](https://ko.react.dev/learn/scaling-up-with-reducer-and-context)에 오타가 존재하여 수정했습니다. ``` - 2단계: State과 dispatch 함수를 context에 넣기 + 2단계: State와 dispatch 함수를 context에 넣기 ``` ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --- src/content/learn/scaling-up-with-reducer-and-context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/scaling-up-with-reducer-and-context.md b/src/content/learn/scaling-up-with-reducer-and-context.md index c0b5d162a..38c6f877f 100644 --- a/src/content/learn/scaling-up-with-reducer-and-context.md +++ b/src/content/learn/scaling-up-with-reducer-and-context.md @@ -450,7 +450,7 @@ ul, li { margin: 0; padding: 0; } 여기서는 두 context에 모두 기본값으로 `null`을 전달하고 있습니다. 실제 값은 `TaskApp` 컴포넌트에서 제공될 것입니다. -### 2단계: State과 dispatch 함수를 context에 넣기 {/*step-2-put-state-and-dispatch-into-context*/} +### 2단계: State와 dispatch 함수를 context에 넣기 {/*step-2-put-state-and-dispatch-into-context*/} 이제 `TaskApp` 컴포넌트에서 두 context를 모두 가져올 수 있습니다. `useReducer()`에서 반환된 `tasks` 및 `dispatch`를 가져와 아래 트리 전체에 [제공](/learn/passing-data-deeply-with-context#step-3-provide-the-context)하세요. From 82f2863efa4e94ec7d2c0d75c1710fbf0cb312b9 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo <91488737+Rekl0w@users.noreply.github.com> Date: Sat, 28 Jun 2025 22:03:46 +0300 Subject: [PATCH 008/368] Fix #6915: typo fix (#6917) From 741e8d94a540dddb1b55ffe9258d1a2ef0edf82b Mon Sep 17 00:00:00 2001 From: Kunall Banerjee <14703164+yeskunall@users.noreply.github.com> Date: Sat, 28 Jun 2025 15:15:48 -0400 Subject: [PATCH 009/368] fix: update ids to point to right part of the docs (#7854) --- src/content/reference/rsc/directives.md | 2 +- src/content/reference/rsc/server-components.md | 16 ++++++++-------- src/content/reference/rsc/use-client.md | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/content/reference/rsc/directives.md b/src/content/reference/rsc/directives.md index c17bcf3a8..fe614fb27 100644 --- a/src/content/reference/rsc/directives.md +++ b/src/content/reference/rsc/directives.md @@ -10,7 +10,7 @@ Directives are for use in [React Server Components](/reference/rsc/server-compon -Directives provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#bleeding-edge-react-frameworks). +Directives provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#full-stack-frameworks). diff --git a/src/content/reference/rsc/server-components.md b/src/content/reference/rsc/server-components.md index 9e6ab11eb..f27fa8b86 100644 --- a/src/content/reference/rsc/server-components.md +++ b/src/content/reference/rsc/server-components.md @@ -4,7 +4,7 @@ title: Server Components -Server Components are for use in [React Server Components](/learn/start-a-new-react-project#bleeding-edge-react-frameworks). +Server Components are for use in [React Server Components](/learn/start-a-new-react-project#full-stack-frameworks). @@ -22,7 +22,7 @@ This separate environment is the "server" in React Server Components. Server Com #### How do I build support for Server Components? {/*how-do-i-build-support-for-server-components*/} -While React Server Components in React 19 are stable and will not break between minor versions, the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x. +While React Server Components in React 19 are stable and will not break between minor versions, the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x. To support React Server Components as a bundler or framework, we recommend pinning to a specific React version, or using the Canary release. We will continue working with bundlers and frameworks to stabilize the APIs used to implement React Server Components in the future. @@ -45,7 +45,7 @@ function Page({page}) { setContent(data.content); }); }, [page]); - + return
{sanitizeHtml(marked(content))}
; } ``` @@ -69,7 +69,7 @@ import sanitizeHtml from 'sanitize-html'; // Not included in bundle async function Page({page}) { // NOTE: loads *during* render, when the app is built. const content = await file.readFile(`${page}.md`); - + return
{sanitizeHtml(marked(content))}
; } ``` @@ -113,7 +113,7 @@ function Note({id}) { setNote(data.note); }); }, [id]); - + return (
@@ -253,7 +253,7 @@ This works by first rendering `Notes` as a Server Component, and then instructin

this is the second note

-
+
``` @@ -270,8 +270,8 @@ import db from './database'; async function Page({id}) { // Will suspend the Server Component. const note = await db.notes.get(id); - - // NOTE: not awaited, will start here and await on the client. + + // NOTE: not awaited, will start here and await on the client. const commentsPromise = db.comments.get(note.id); return (
diff --git a/src/content/reference/rsc/use-client.md b/src/content/reference/rsc/use-client.md index e259585c4..5a0a7d96b 100644 --- a/src/content/reference/rsc/use-client.md +++ b/src/content/reference/rsc/use-client.md @@ -41,7 +41,7 @@ export default function RichTextEditor({ timestamp, text }) { } ``` -When a file marked with `'use client'` is imported from a Server Component, [compatible bundlers](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) will treat the module import as a boundary between server-run and client-run code. +When a file marked with `'use client'` is imported from a Server Component, [compatible bundlers](/learn/start-a-new-react-project#full-stack-frameworks) will treat the module import as a boundary between server-run and client-run code. As dependencies of `RichTextEditor`, `formatDate` and `Button` will also be evaluated on the client regardless of whether their modules contain a `'use client'` directive. Note that a single module may be evaluated on the server when imported from server code and on the client when imported from client code. From c0c955ed1d1c4fe3bf3e18c06a8d121902a01619 Mon Sep 17 00:00:00 2001 From: Noritaka Kobayashi Date: Sun, 29 Jun 2025 04:20:02 +0900 Subject: [PATCH 010/368] chore: remove unused date-fns (#7856) --- package.json | 1 - yarn.lock | 5 ----- 2 files changed, 6 deletions(-) diff --git a/package.json b/package.json index 6d6b53f92..918d42fa2 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "@radix-ui/react-context-menu": "^2.1.5", "body-scroll-lock": "^3.1.3", "classnames": "^2.2.6", - "date-fns": "^2.16.1", "debounce": "^1.2.1", "github-slugger": "^1.3.0", "next": "15.1.0", diff --git a/yarn.lock b/yarn.lock index a118cbeda..e866a206b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2799,11 +2799,6 @@ data-view-byte-offset@^1.0.0: es-errors "^1.3.0" is-data-view "^1.0.1" -date-fns@^2.16.1: - version "2.28.0" - resolved "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz" - integrity sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw== - debounce@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz" From b00721bd30a775b4f1e50b707c87e39524ae6553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 30 Jun 2025 13:58:10 +0900 Subject: [PATCH 011/368] docs: resolve conflicts --- src/content/reference/rsc/directives.md | 6 +----- src/content/reference/rsc/server-components.md | 12 ++---------- src/content/reference/rsc/use-client.md | 6 +----- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/content/reference/rsc/directives.md b/src/content/reference/rsc/directives.md index 7c5b442d1..c0bafe899 100644 --- a/src/content/reference/rsc/directives.md +++ b/src/content/reference/rsc/directives.md @@ -10,11 +10,7 @@ title: "지시어" -<<<<<<< HEAD -지시어는 [React 서버 컴포넌트와 호환되는 번들러](/learn/start-a-new-react-project#bleeding-edge-react-frameworks)에게 지시사항을 제공합니다. -======= -Directives provide instructions to [bundlers compatible with React Server Components](/learn/start-a-new-react-project#full-stack-frameworks). ->>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619 +지시어는 [React 서버 컴포넌트와 호환되는 번들러](/learn/start-a-new-react-project#full-stack-frameworks)에게 지시사항을 제공합니다. diff --git a/src/content/reference/rsc/server-components.md b/src/content/reference/rsc/server-components.md index 1f7d3aaa3..29b2d8137 100644 --- a/src/content/reference/rsc/server-components.md +++ b/src/content/reference/rsc/server-components.md @@ -4,11 +4,7 @@ title: 서버 컴포넌트 -<<<<<<< HEAD -서버 컴포넌트는 [React 서버 컴포넌트](/learn/start-a-new-react-project#bleeding-edge-react-frameworks)에서 사용합니다. -======= -Server Components are for use in [React Server Components](/learn/start-a-new-react-project#full-stack-frameworks). ->>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619 +서버 컴포넌트는 [React 서버 컴포넌트](/learn/start-a-new-react-project#full-stack-frameworks)에서 사용합니다. @@ -26,11 +22,7 @@ Server Components are for use in [React Server Components](/learn/start-a-new-re #### 서버 컴포넌트를 지원하려면 어떻게 해야 하나요? {/*how-do-i-build-support-for-server-components*/} -<<<<<<< HEAD -React 19의 서버 컴포넌트는 안정적이며 마이너(Minor) 버전 간에는 변경되지 않습니다. 그러나 React 서버 컴포넌트 번들러나 프레임워크를 구현하는 데 사용되는 기본 API는 시맨틱 버전(semver)을 따르지 않으며 React 19.x의 마이너(Minor) 버전 간에 변경될 수 있습니다. -======= -While React Server Components in React 19 are stable and will not break between minor versions, the underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x. ->>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619 +React 19의 서버 컴포넌트는 안정적이며 마이너Minor 버전 간에는 변경되지 않습니다. 그러나 React 서버 컴포넌트 번들러나 프레임워크를 구현하는 데 사용되는 기본 API는 시맨틱 버전SemVer을 따르지 않으며 React 19.x의 마이너Minor 버전 간에 변경될 수 있습니다. React 서버 컴포넌트를 번들러나 프레임워크로 지원하려면, 특정 React 버전에 고정하거나 Canary 릴리즈를 사용하는 것을 권장합니다. 향후 React 서버 컴포넌트를 구현하는 데 사용되는 API를 안정화하기 위해 번들러 및 프레임워크와 계속 협력할 것입니다. diff --git a/src/content/reference/rsc/use-client.md b/src/content/reference/rsc/use-client.md index f9d3b6477..8f6694b21 100644 --- a/src/content/reference/rsc/use-client.md +++ b/src/content/reference/rsc/use-client.md @@ -41,11 +41,7 @@ export default function RichTextEditor({ timestamp, text }) { } ``` -<<<<<<< HEAD -서버 컴포넌트에서 `'use client'`라 표시된 파일을 가져오면 [호환되는 번들러](/learn/start-a-new-react-project#bleeding-edge-react-frameworks)는 모듈 불러오기Module Import를 서버 실행 코드와 클라이언트 실행 코드 사이의 경계로 처리합니다. -======= -When a file marked with `'use client'` is imported from a Server Component, [compatible bundlers](/learn/start-a-new-react-project#full-stack-frameworks) will treat the module import as a boundary between server-run and client-run code. ->>>>>>> c0c955ed1d1c4fe3bf3e18c06a8d121902a01619 +서버 컴포넌트에서 `'use client'`라 표시된 파일을 가져오면 [호환되는 번들러](/learn/start-a-new-react-project#full-stack-frameworks)는 모듈 불러오기Module Import를 서버 실행 코드와 클라이언트 실행 코드 사이의 경계로 처리합니다. `RichTextEditor`의 의존성으로 인하여, `formatDate`와 `Button`의 모듈에 `'use client'` 지시어가 포함되어 있지 않더라도 클라이언트에서 평가됩니다. 하나의 모듈이 서버 코드에서 가져올 때는 서버에서, 클라이언트 코드에서 가져올 때는 클라이언트에서 평가될 수 있음을 유의해야 합니다. From 7dd19d46d79ef153c7d9f5de37f6eaff2f8c7c51 Mon Sep 17 00:00:00 2001 From: jeremyko Date: Mon, 30 Jun 2025 18:59:01 +0900 Subject: [PATCH 012/368] docs: clarify a sentence in `reusing-logic-with-custom-hooks` (#1224) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # "커스텀 Hook으로 로직 재사용하기" 단원에 번역 오류 수정 원문 : This is why your Effect re-connects to the chat whenever their values are different after a re-render. 번역 수정 : 이게 바로 재렌더링 이후에 값이 달라지는지 여부에 관계없이 Effect가 재연결하는 이유입니다. --> 이것이 바로 Effect가 다시 렌더링된 후 값이 다를 때마다 채팅에 다시 연결되는 이유입니다. ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --- src/content/learn/reusing-logic-with-custom-hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/reusing-logic-with-custom-hooks.md b/src/content/learn/reusing-logic-with-custom-hooks.md index 1870be649..eb6de196a 100644 --- a/src/content/learn/reusing-logic-with-custom-hooks.md +++ b/src/content/learn/reusing-logic-with-custom-hooks.md @@ -832,7 +832,7 @@ export default function ChatRoom({ roomId }) { // ... ``` -매번 `ChatRoom`가 재렌더링될 때마다, Hook에 최신 `roomId`와 `serverUrl` 값을 넘겨줍니다. 이게 바로 재렌더링 이후에 값이 달라지는지 여부에 관계없이 Effect가 재연결하는 이유입니다. (만약 오디오 또는 비디오 처리 소프트웨어를 작업해 본 적이 있다면, 이처럼 Hook을 연결하는 것이 시각적 혹은 청각적 효과를 연결하는 것을 떠오르게 할 겁니다. 이게 바로 `useState`의 결과를 `useChatRoom`의 입력으로 "넣어주는 것"과 같습니다.) +매번 `ChatRoom`가 재렌더링될 때마다, Hook에 최신 `roomId`와 `serverUrl` 값을 넘겨줍니다. 이것이 바로 Effect가 다시 렌더링된 후 값이 다를 때마다 채팅에 다시 연결되는 이유입니다. (만약 오디오 또는 비디오 처리 소프트웨어를 작업해 본 적이 있다면, 이처럼 Hook을 연결하는 것이 시각적 혹은 청각적 효과를 연결하는 것을 떠오르게 할 겁니다. 이게 바로 `useState`의 결과를 `useChatRoom`의 입력으로 "넣어주는 것"과 같습니다.) ### 커스텀 Hook에 이벤트 핸들러 넘겨주기 {/*passing-event-handlers-to-custom-hooks*/} From 839157c8544d176f8312cbb811c682fa6579cb19 Mon Sep 17 00:00:00 2001 From: baegyeong <102566546+baegyeong@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:27:41 +0900 Subject: [PATCH 013/368] docs: fix typo in useEffect.md (#1225) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # fix typo in useEffect.md useEffect.md 문서의 오타를 수정했습니다. ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --- src/content/reference/react/useEffect.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/reference/react/useEffect.md b/src/content/reference/react/useEffect.md index 297649cd4..1b8ee4e36 100644 --- a/src/content/reference/react/useEffect.md +++ b/src/content/reference/react/useEffect.md @@ -1437,7 +1437,7 @@ function Counter() { `count`가 반응형 값이므로 반드시 의존성 배열에 추가해야 합니다. 그러나 `count`가 변경되는 것은 Effect가 정리된 후 다시 설정되는 것을 야기하므로 `count`는 계속 증가할 것입니다. 이상적이지 않은 방식입니다. -이러한 현상을 방지하려면 [`c => c + 1` state 변경함수](/reference/react/useState#updating-state-based-on-the-previous-state)를 `setCount`에 추가하세요, +이러한 현상을 방지하려면 [`c => c + 1` state 변경함수](/reference/react/useState#updating-state-based-on-the-previous-state)를 `setCount`에 추가하세요. @@ -1576,7 +1576,7 @@ button { margin-left: 10px; } 이제 `options` 객체를 Effect 내에서 생성하면, Effect 자체는 roomId 문자열에만 의존합니다. -이 수정으로 입력란에 텍스트를 입력하더라도 채팅이 다시 연결되지 않습니다. 객체와는 달리 `roomId`와 같은 문자열은 다른 값으로 설정하지 않는 한 변경되지 않습니다. [의존성 제거에 관한 자세한 애용은 여기를 참고하세요.](/learn/removing-effect-dependencies) +이 수정으로 입력란에 텍스트를 입력하더라도 채팅이 다시 연결되지 않습니다. 객체와는 달리 `roomId`와 같은 문자열은 다른 값으로 설정하지 않는 한 변경되지 않습니다. [의존성 제거에 관한 자세한 내용은 여기를 참고하세요.](/learn/removing-effect-dependencies) --- @@ -1814,7 +1814,7 @@ Object.is(temp1[2], temp2[2]); // ... 나머지 모든 의존성도 확인합니 ### Effect가 무한 반복됩니다. {/*my-effect-keeps-re-running-in-an-infinite-cycle*/} -Effect가 무한 반복되려면 다음 두 가지 조건이 충족되어야 합니다.. +Effect가 무한 반복되려면 다음 두 가지 조건이 충족되어야 합니다. - Effect에서 state를 업데이트함. - 변경된 state가 리렌더링을 유발하며, 이에 따라 Effect의 종속성이 변경됨. From b79ad220a4505415248892b881baa8f0ea1dff1d Mon Sep 17 00:00:00 2001 From: Batuhan Tomo <91488737+Rekl0w@users.noreply.github.com> Date: Wed, 2 Jul 2025 18:57:33 +0300 Subject: [PATCH 014/368] chore: fix typo in resource and metadata components documentation (#7006) From 341c312916e1b657262bbe14b134a6f1779fecf1 Mon Sep 17 00:00:00 2001 From: Dipesh B C <50456672+bcdipesh@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:47:23 -0400 Subject: [PATCH 015/368] fix: correct typo in scaling-up-with-reducer-and-context.md (#7390) Fix typo in the 'Step 3: Use context anywhere in the tree' section by changing TaskContext to TasksContext for accuracy. --- src/content/learn/scaling-up-with-reducer-and-context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/scaling-up-with-reducer-and-context.md b/src/content/learn/scaling-up-with-reducer-and-context.md index 91fb6803f..fe1762d8e 100644 --- a/src/content/learn/scaling-up-with-reducer-and-context.md +++ b/src/content/learn/scaling-up-with-reducer-and-context.md @@ -685,7 +685,7 @@ Now you don't need to pass the list of tasks or the event handlers down the tree ``` -Instead, any component that needs the task list can read it from the `TaskContext`: +Instead, any component that needs the task list can read it from the `TasksContext`: ```js {2} export default function TaskList() { From 94abe39a64a1e1c75954292fbb5ff33a1ab6cf98 Mon Sep 17 00:00:00 2001 From: Kim Min-gyu <99083803+cobocho@users.noreply.github.com> Date: Sun, 6 Jul 2025 17:52:02 +0900 Subject: [PATCH 016/368] docs: add Korean translation for `` API page (#1227) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # `` API 한국어 번역 [ViewTranstion API](https://ko.react.dev/reference/react/ViewTransition)의 콘텐츠를 한국어로 번역했습니다. close #1226 ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --------- Co-authored-by: 루밀LuMir --- src/content/reference/react/ViewTransition.md | 236 +++++++++--------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/src/content/reference/react/ViewTransition.md b/src/content/reference/react/ViewTransition.md index c2aaed3fa..306b22e78 100644 --- a/src/content/reference/react/ViewTransition.md +++ b/src/content/reference/react/ViewTransition.md @@ -5,21 +5,21 @@ version: experimental -**This API is experimental and is not available in a stable version of React yet.** +**이 API는 실험적이며 아직 React의 안정 버전에서 사용할 수 없습니다.** -You can try it by upgrading React packages to the most recent experimental version: +React 패키지를 최신 실험적 버전으로 업그레이드하여 시도해볼 수 있습니다. - `react@experimental` - `react-dom@experimental` - `eslint-plugin-react-hooks@experimental` -Experimental versions of React may contain bugs. Don't use them in production. +React의 실험적 버전에는 버그가 포함될 수 있습니다. 프로덕션 환경에서는 사용하지 마세요. -`` lets you animate elements that update inside a Transition. +``을 사용하면 Transition 내부에서 업데이트되는 엘리먼트에 애니메이션을 적용할 수 있습니다. ```js @@ -36,97 +36,97 @@ import {unstable_ViewTransition as ViewTransition} from 'react'; --- -## Reference {/*reference*/} +## 레퍼런스 {/*reference*/} ### `` {/*viewtransition*/} -Wrap elements in `` to animate them when they update inside a [Transition](/reference/react/useTransition). React uses the following heuristics to determine if a View Transition activates for an animation: +엘리먼트를 ``으로 감싸면 [Transition](/reference/react/useTransition) 내부에서 업데이트할 때 애니메이션을 적용할 수 있습니다. React는 다음 휴리스틱을 사용하여 View Transition이 애니메이션에 활성화되는지 판단합니다. -- `enter`: If a `ViewTransition` itself gets inserted in this Transition, then this will activate. -- `exit`: If a `ViewTransition` itself gets deleted in this Transition, then this will activate. -- `update`: If a `ViewTransition` has any DOM mutations inside it that React is doing (such as a prop changing) or if the `ViewTransition` boundary itself changes size or position due to an immediate sibling. If there are nested` ViewTransition` then the mutation applies to them and not the parent. -- `share`: If a named `ViewTransition` is inside a deleted subtree and another named `ViewTransition` with the same name is part of an inserted subtree in the same Transition, they form a Shared Element Transition, and it animates from the deleted one to the inserted one. +- `enter`: 해당 Transition에서 `ViewTransition` 자체가 삽입되면 활성화됩니다. +- `exit`: 해당 Transition에서 `ViewTransition` 자체가 삭제되면 활성화됩니다. +- `update`: `ViewTransition` 내부에서 React가 수행하는 DOM 변경(예: 프로퍼티 변경)이 있거나 인접한 형제 엘리먼트의 영향으로 `ViewTransition` 경계 자체의 크기나 위치가 변경되는 경우 활성화됩니다. 중첩된 `ViewTransition`이 있으면 변경이 부모가 아닌 해당 항목에 적용됩니다. +- `share`: 이름이 지정된 `ViewTransition`이 삭제된 서브트리 내부에 있고 같은 이름을 가진 다른 이름 있는 `ViewTransition`이 같은 Transition에서 삽입된 서브트리의 일부인 경우 공유 엘리먼트 Transition을 형성하며, 삭제된 것에서 삽입된 것으로 애니메이션됩니다. -By default, `` animates with a smooth cross-fade (the browser default view transition). You can customize the animation by providing a [View Transition Class](#view-transition-class) to the `` component. You can customize animations for each kind of trigger (see [Styling View Transitions](#styling-view-transitions)). +기본적으로 ``은 부드러운 크로스 페이드(브라우저 기본 View Transition)로 애니메이션됩니다. `` 컴포넌트에 [View Transition 클래스](#view-transition-class)를 제공하여 애니메이션을 커스터마이징할 수 있습니다. 각 트리거 유형에 대해 애니메이션을 커스터마이징할 수 있습니다([View Transition 스타일링](#styling-view-transitions) 참고). -#### How does `` work? {/*how-does-viewtransition-work*/} +#### ``은 어떻게 작동하나요? {/*how-does-viewtransition-work*/} -Under the hood, React applies `view-transition-name` to inline styles of the nearest DOM node nested inside the `` component. If there are multiple sibling DOM nodes like `
` then React adds a suffix to the name to make each unique but conceptually they're part of the same one. React doesn't apply these eagerly but only at the time that boundary should participate in an animation. +내부적으로 React는 `` 컴포넌트 내부에 중첩된 가장 가까운 DOM 노드의 인라인 스타일에 `view-transition-name`을 적용합니다. `
`처럼 여러 형제 DOM 노드가 있을 경우, React는 각 노드의 이름이 고유하도록 접미사를 추가하지만, 개념적으로는 동일한 전환에 속하는 것으로 간주합니다. -React automatically calls `startViewTransition` itself behind the scenes so you should never do that yourself. In fact, if you have something else on the page running a ViewTransition React will interrupt it. So it's recommended that you use React itself to coordinate these. If you had other ways of trigger ViewTransitions in the past, we recommend that you migrate to the built-in way. +React는 내부적으로 `startViewTransition`을 자체적으로 호출하므로 직접 호출해서는 안됩니다. 실제로 페이지에서 다른 스크립트나 코드가 ViewTransition을 실행하고 있다면 React가 이를 중단합니다. 따라서 React 자체를 사용하여 이를 조정하는 것을 권장합니다. 과거에 ViewTransition을 트리거하는 다른 방법이 있었다면 내장 방법으로 마이그레이션하는 것을 권장합니다. -If there are other React ViewTransitions already running then React will wait for them to finish before starting the next one. However, importantly if there are multiple updates happening while the first one is running, those will all be batched into one. If you start A->B. Then in the meantime you get an update to go to C and then D. When the first A->B animation finishes the next one will animate from B->D. +다른 React ViewTransition이 이미 실행 중이라면, React는 그것들을 완료할 때까지 다음 전환을 시작하지 않습니다. 그러나 중요한 점은 첫 번째 전환이 진행되는 동안 여러 업데이트가 발생하면, 그 업데이트들은 모두 하나로 묶여 처리된다는 것입니다. 예를 들어 A에서 B로 이동하는 전환을 시작했다고 가정합시다. 그 사이에 C로 가는 업데이트가 발생하고 다시 D로 가는 업데이트가 발생한다면, 첫 번째 A->B 애니메이션이 끝난 후 다음 애니메이션은 B에서 D로 전환됩니다. -The `getSnapshotBeforeUpdate` life-cycle will be called before `startViewTransition` and some `view-transition-name` will update at the same time. +`getSnapshotBeforeUpdate` 생명주기는 `startViewTransition` 전에 호출되고 일부 `view-transition-name`은 동시에 업데이트됩니다. -Then React calls `startViewTransition`. Inside the `updateCallback`, React will: +그런 다음 React는 `startViewTransition`을 호출합니다. `updateCallback` 내부에서 React는 다음을 수행합니다. -- Apply its mutations to the DOM and invoke useInsertionEffects. -- Wait for fonts to load. -- Call componentDidMount, componentDidUpdate, useLayoutEffect and refs. -- Wait for any pending Navigation to finish. -- Then React will measure any changes to the layout to see which boundaries will need to animate. +- DOM에 변경을 적용하고 `useInsertionEffect`를 호출합니다. +- 폰트가 로드될 때까지 기다립니다. +- componentDidMount, componentDidUpdate, useLayoutEffect, refs를 호출합니다. +- 대기 중인 탐색이 완료될 때까지 기다립니다. +- 그런 다음 React는 레이아웃의 변경 사항을 측정하여 어떤 경계가 애니메이션되어야 하는지 확인합니다. -After the ready Promise of the `startViewTransition` is resolved, React will then revert the `view-transition-name`. Then React will invoke the `onEnter`, `onExit`, `onUpdate` and `onShare` callbacks to allow for manual programmatic control over the Animations. This will be after the built-in default ones have already been computed. +`startViewTransition`의 ready Promise가 해결된 이후, React는 `view-transition-name`을 되돌립니다. 그 다음 React는 `onEnter`, `onExit`, `onUpdate`, `onShare` 콜백들을 호출하여 애니메이션에 대해 수동으로 프로그래밍 방식의 제어를 할 수 있도록 합니다. 이 호출은 내장된 기본 애니메이션이 이미 계산된 이후에 이루어집니다. -If a `flushSync` happens to get in the middle of this sequence, then React will skip the Transition since it relies on being able to complete synchronously. +이 시퀀스 중간에 `flushSync`가 발생하면 동기적으로 완료되어야 하는 특성 때문에 React는 해당 Transition을 건너뜁니다. -After the finished Promise of the `startViewTransition` is resolved, React will then invoke `useEffect`. This prevents those from interfering with the performance of the Animation. However, this is not a guarantee because if another `setState` happens while the Animation is running it'll still have to invoke the `useEffect` earlier to preserve the sequential guarantees. +`startViewTransition`의 finished Promise가 해결된 이후에 React는 `useEffect`를 호출합니다. 이렇게 하면 `useEffect`가 애니메이션 성능에 영향을 주지 않도록 방지할 수 있습니다. 그러나 이것이 반드시 보장되는 것은 아닙니다. 만약 애니메이션이 실행되는 도중에 다른 `setState`가 발생하면, 순차적 동작 보장을 유지하기 위해 `useEffect`를 더 일찍 호출해야 할 수도 있습니다. #### Props {/*props*/} -By default, `` animates with a smooth cross-fade. You can customize the animation, or specify a shared element transition, with these props: +기본적으로 ``은 부드러운 크로스 페이드로 애니메이션됩니다. 이러한 프로퍼티로 애니메이션을 커스터마이즈하거나 공유 엘리먼트 Transition을 지정할 수 있습니다. -* **optional** `enter`: A string or object. The [View Transition Class](#view-transition-class) to apply when enter is activated. -* **optional** `exit`: A string or object. The [View Transition Class](#view-transition-class) to apply when exit is activated. -* **optional** `update`: A string or object. The [View Transition Class](#view-transition-class) to apply when an update is activated. -* **optional** `share`: A string or object. The [View Transition Class](#view-transition-class) to apply when a shared element is activated. -* **optional** `default`: A string or object. The [View Transition Class](#view-transition-class) used when no other matching activation prop is found. -* **optional** `name`: A string or object. The name of the View Transition used for shared element transitions. If not provided, React will use a unique name for each View Transition to prevent unexpected animations. +* **optional** `enter`: 문자열 또는 객체. "enter"가 활성화될 때 적용할 [View Transition 클래스](#view-transition-class)입니다. +* **optional** `exit`: 문자열 또는 객체. "exit"이 활성화될 때 적용할 [View Transition 클래스](#view-transition-class)입니다. +* **optional** `update`: 문자열 또는 객체. "update"가 활성화될 때 적용할 [View Transition 클래스](#view-transition-class)입니다. +* **optional** `share`: 문자열 또는 객체. 공유 엘리먼트가 활성화될 때 적용할 [View Transition 클래스](#view-transition-class)입니다. +* **optional** `default`: 문자열 또는 객체. 다른 일치하는 활성화 프로퍼티가 없을 때 사용되는 [View Transition 클래스](#view-transition-class)입니다. +* **optional** `name`: 문자열 또는 객체. 공유 엘리먼트 transition에 사용되는 View Transition의 이름입니다. 제공되지 않으면 React는 예상치 못한 애니메이션을 방지하기 위해 각 View Transition에 대해 고유한 이름을 사용합니다. -#### Callback {/*events*/} +#### 콜백 {/*events*/} -These callbacks allow you to adjust the animation imperatively using the [animate](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate) APIs: +이 콜백을 사용하면 [animate](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate) API를 사용하여 애니메이션을 명령적으로 조정할 수 있습니다. -* **optional** `onEnter`: A function. React calls `onEnter` after an "enter" animation. -* **optional** `onExit`: A function. React calls `onExit` after an "exit" animation. -* **optional** `onShare`: A function. React calls `onShare` after a "share" animation. -* **optional** `onUpdate`: A function. React calls `onUpdate` after an "update" animation. +* **optional** `onEnter`: 함수. React는 "enter" 애니메이션 후에 `onEnter`를 호출합니다. +* **optional** `onExit`: 함수. React는 "exit" 애니메이션 후에 `onExit`를 호출합니다. +* **optional** `onShare`: 함수. React는 "share" 애니메이션 후에 `onShare`를 호출합니다. +* **optional** `onUpdate`: 함수. React는 "update" 애니메이션 후에 `onUpdate`를 호출합니다. -Each callback receives as arguments: -- `element`: The DOM element that was animated. -- `types`: The [Transition Types](/reference/react/addTransitionType) included in the animation. +각 콜백은 다음을 인수로 받습니다. +- `element`: 애니메이션된 DOM 엘리먼트입니다. +- `types`: 애니메이션에 포함된 [Transition 타입](/reference/react/addTransitionType)입니다. -### View Transition Class {/*view-transition-class*/} +### View Transition 클래스 {/*view-transition-class*/} -The View Transition Class is the CSS class name(s) applied by React during the transition when the ViewTransition activates. It can be a string or an object. -- `string`: the `class` added on the child elements when activated. If `'none'` is provided, no class will be added. -- `object`: the class added on the child elements will be the key matching View Transition type added with `addTransitionType`. The object can also specify a `default` to use if no matching type is found. +View Transition 클래스는 ViewTransition이 활성화될 때 Transition 중에 React가 적용하는 CSS 클래스 이름입니다. 문자열 또는 객체일 수 있습니다. +- `string`: 활성화될 때 자식 엘리먼트에 추가되는 `class`입니다. `'none'`이 제공되면 클래스가 추가되지 않습니다. +- `object`: 자식 엘리먼트에 추가되는 클래스는 `addTransitionType`으로 추가된 View Transition 타입과 일치하는 키입니다. 객체는 일치하는 타입이 없을 때 사용할 `default`도 지정할 수 있습니다. -The value `'none'` can be used to prevent a View Transition from activating for a specific trigger. +값 `'none'`은 특정 트리거에 대해 View Transition이 활성화되지 않도록 하는 데 사용할 수 있습니다. -### Styling View Transitions {/*styling-view-transitions*/} +### View Transition 스타일링 {/*styling-view-transitions*/} -In many early examples of View Transitions around the web, you'll have seen using a [`view-transition-name`](https://developer.mozilla.org/en-US/docs/Web/CSS/view-transition-name) and then style it using `::view-transition-...(my-name)` selectors. We don't recommend that for styling. Instead, we normally recommend using a View Transition Class instead. +웹에서 View Transition의 많은 초기 예시에서 [`view-transition-name`](https://developer.mozilla.org/en-US/docs/Web/CSS/view-transition-name)을 사용한 다음 `::view-transition-...(my-name)` 선택자를 사용하여 스타일을 지정하는 것을 볼 수 있습니다. 그러나 이러한 방식으로 스타일링하는 것을 권장하지 않습니다. 대신, 일반적으로 View Transition 클래스를 사용하는 것을 권장합니다. -To customize the animation for a `` you can provide a View Transition Class to one of the activation props. The View Transition Class is a CSS class name that React applies to the child elements when the ViewTransition activates. +``의 애니메이션을 커스터마이즈하려면 활성화 프로퍼티 중 하나에 View Transition 클래스를 제공할 수 있습니다. View Transition 클래스는 ViewTransition이 활성화될 때 React가 자식 엘리먼트에 적용하는 CSS 클래스 이름입니다. -For example, to customize an "enter" animation, provide a class name to the `enter` prop: +예를 들어 "enter" 애니메이션을 커스터마이즈하려면 `enter` 프로퍼티에 클래스 이름을 제공합니다. ```js ``` -When the `` activates an "enter" animation, React will add the class name `slide-in`. Then you can refer to this class using [view transition pseudo selectors](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API#pseudo-elements) to build reusable animations: +``이 "enter" 애니메이션을 활성화하면 React는 클래스 이름 `slide-in`을 추가합니다. 그런 다음 [View Transition 가상 선택자](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API#pseudo-elements)를 사용하여 이 클래스를 참조하여 재사용 가능한 애니메이션을 구축할 수 있습니다. ```css ::view-transition-group(.slide-in) { @@ -139,23 +139,23 @@ When the `` activates an "enter" animation, React will add the c } ``` -In the future, CSS libraries may add built-in animations using View Transition Classes to make this easier to use. +향후 CSS 라이브러리에서 View Transition 클래스를 사용한 내장 애니메이션을 추가하여 사용하기 쉽게 만들 수 있습니다. -#### Caveats {/*caveats*/} +#### 주의 사항 {/*caveats*/} -- By default, `setState` updates immediately and does not activate ``, only updates wrapped in a [Transition](/reference/react/useTransition). You can also use [``](/reference/react/Suspense) to opt-in to a Transition to [reveal content](/link-to-suspense-below). -- `` creates an image that can be moved around, scaled and cross-faded. Unlike Layout Animations you may have seen in React Native or Motion, this means that not every individual Element inside of it animates its position. This can lead to better performance and a more continuous feeling, smooth animation compared to animating every individual piece. However, it can also lose continuity in things that should be moving by themselves. So you might have to add more `` boundaries manually as a result. -- Many users may prefer not having animations on the page. React doesn't automatically disable animations for this case. We recommend that using the `@media (prefers-reduced-motion)` media query to disable animations or tone them down based on user preference. In the future, CSS libraries may have this built-in to their presets. -- Currently, `` only works in the DOM. We're working on adding support for React Native and other platforms. +- 기본적으로 `setState` 업데이트는 즉시 이루어지며 ``을 활성화하지 않습니다. [Transition](/reference/react/useTransition)으로 감싼 업데이트만 해당됩니다. [``](/reference/react/Suspense)를 사용하여 Transition을 선택하여 [콘텐츠를 표시](/link-to-suspense-below)할 수도 있습니다. +- ``은 이동, 확대/축소, 크로스 페이드할 수 있는 이미지를 생성합니다. React Native나 Motion에서 본 레이아웃 애니메이션과 달리 내부의 모든 개별 엘리먼트가 위치에 애니메이션되지는 않습니다. 이는 더 나은 성능과 개별 부분을 애니메이션하는 것과 비교하여 더 연속적이고 부드러운 애니메이션 느낌을 줄 수 있습니다. 그러나 스스로 움직여야 하는 것들의 연속성을 잃을 수도 있습니다. 결과적으로 더 많은 `` 경계를 수동으로 추가해야 할 수 있습니다. +- 많은 사용자가 페이지에서 애니메이션을 선호하지 않을 수 있습니다. React는 이 경우 애니메이션을 자동으로 비활성화하지 않습니다. 사용자 선호도에 따라 `@media (prefers-reduced-motion)` 미디어 쿼리를 사용하여 애니메이션을 비활성화하거나 약하게 만드는 것을 권장합니다. 향후 CSS 라이브러리에서는 프리셋에 이것이 내장되어 있을 수 있습니다. +- 현재 ``은 DOM에서만 작동합니다. React Native 및 다른 플랫폼에 대한 지원을 추가하는 작업을 진행하고 있습니다. --- -## Usage {/*usage*/} +## 사용법 {/*usage*/} -### Animating an element on enter/exit {/*animating-an-element-on-enter*/} +### enter/exit에서 엘리먼트 애니메이션 적용하기 {/*animating-an-element-on-enter*/} -Enter/Exit Transitions trigger when a `` is added or removed by a component in a transition: +Enter/Exit Transition은 ``이 Transition에서 컴포넌트에 의해 추가되거나 제거될 때 발생합니다. ```js function Child() { @@ -171,9 +171,9 @@ function Parent() { } ``` -When `setShow` is called, `show` switches to `true` and the `Child` component is rendered. When `setShow` is called inside `startTransition`, and `Child` renders a `ViewTransition` before any other DOM nodes, an `enter` animation is triggered. +`setShow`가 호출되면 `show`가 `true`로 바뀌고 `Child` 컴포넌트가 렌더링됩니다. `setShow`가 `startTransition` 내부에서 호출되고 `Child`가 다른 DOM 노드보다 먼저 `ViewTransition`을 렌더링하면 `enter` 애니메이션이 발생합니다. -When `show` switches back to `false`, an `exit` animation is triggered. +`show`가 다시 `false`로 바뀌면 `exit` 애니메이션이 발생합니다. @@ -348,7 +348,7 @@ button:hover { -`` only activates if it is placed before any DOM node. If `Child` instead looked like this, no animation would trigger: +``은 DOM 노드보다 앞에 배치되어야만 활성화됩니다. `Child`가 다음과 같다면 애니메이션이 발생하지 않습니다. ```js [3, 5] function Component() { @@ -363,9 +363,9 @@ function Component() { --- -### Animating a shared element {/*animating-a-shared-element*/} +### 공유 엘리먼트 애니메이션 적용하기 {/*animating-a-shared-element*/} -Normally, we don't recommend assigning a name to a `` and instead let React assign it an automatic name. The reason you might want to assign a name is to animate between completely different components when one tree unmounts and another tree mounts at the same time. To preserve continuity. +일반적으로 ``에 이름을 할당하는 것보다 React가 자동으로 이름을 할당하도록 하는 것을 권장합니다. 이름을 할당하고 싶은 경우는 하나의 트리가 마운트 해제되고 다른 트리가 동시에 마운트될 때 완전히 다른 컴포넌트 간에 애니메이션을 적용하여 연속성을 보존하고자 할 때입니다. ```js @@ -373,11 +373,11 @@ Normally, we don't recommend assigning a name to a `` and instea ``` -When one tree unmounts and another mounts, if there's a pair where the same name exists in the unmounting tree and the mounting tree, they trigger the "share" animation on both. It animates from the unmounting side to the mounting side. +하나의 트리가 마운트 해제되고 다른 트리가 마운트될 때 마운트 해제되는 트리와 마운트되는 트리에서 동일한 이름이 존재하는 쌍이 있으면 둘 다에서 "share" 애니메이션이 발생합니다. 마운트 해제되는 쪽에서 마운트되는 쪽으로 애니메이션이 적용됩니다. -Unlike an exit/enter animation this can be deeply inside the deleted/mounted tree. If a `` would also be eligible for exit/enter, then the "share" animation takes precedence. +exit/enter 애니메이션과 달리 삭제되거나 새로 마운트된 트리의 깊숙한 곳에서도 적용될 수 있습니다. ``이 exit/enter에도 해당한다면 "share" 애니메이션이 우선순위를 갖습니다. -If Transition first unmounts one side and then leads to a `` fallback being shown before eventually the new name being mounted, then no shared element transition happens. +Transition이 먼저 한쪽을 마운트 해제하고 새로운 이름이 마운트되기 전에 `` 폴백이 표시되는 경우 공유 엘리먼트 Transition은 발생하지 않습니다. @@ -594,17 +594,17 @@ button:hover { -If either the mounted or unmounted side of a pair is outside the viewport, then no pair is formed. This ensures that it doesn't fly in or out of the viewport when something is scrolled. Instead it's treated as a regular enter/exit by itself. +한 쌍의 마운트된 쪽이나 마운트 해제된 쪽 중 하나가 뷰포트 밖에 있으면 쌍이 형성되지 않습니다. 이는 무언가가 스크롤될 때 뷰포트 안팎으로 날아가는 것을 방지합니다. 대신 일반적인 enter/exit로 자체적으로 처리됩니다. -This does not happen if the same Component instance changes position, which triggers an "update". Those animate regardless if one position is outside the viewport. +동일한 컴포넌트 인스턴스가 위치를 변경하는 경우에는 이런 일이 발생하지 않으며 "update"가 발생합니다. 한 위치가 뷰포트 밖에 있어도 애니메이션이 적용됩니다. -There's currently a quirk where if a deeply nested unmounted `` is inside the viewport but the mounted side is not within the viewport, then the unmounted side animates as its own "exit" animation even if it's deeply nested instead of as part of the parent animation. +현재 한 가지 특이한 점이 있는데, 깊게 중첩된 마운트 해제된 ``이 뷰포트 안에 있고, 마운트되는 쪽이 뷰포트 밖에 있는 경우, 해당 마운트 해제된 요소는 부모 애니메이션의 일부로 동작하는 대신, 깊게 중첩되어 있더라도 자체적인 "exit" 애니메이션으로 동작하게 됩니다. -It's important that there's only one thing with the same name mounted at a time in the entire app. Therefore it's important to use unique namespaces for the name to avoid conflicts. To ensure you can do this you might want to add a constant in a separate module that you import. +전체 앱에서 동시에 동일한 `name`으로 마운트된 것이 하나만 있어야 한다는 것이 중요합니다. 따라서 충돌을 피하기 위해 `name`에 고유한 네임스페이스를 사용하는 것이 중요합니다. 이를 확실히 하기 위해 가져올 수 있는 별도 모듈에 상수를 추가하는 것이 좋습니다. ```js export const MY_NAME = "my-globally-unique-name"; @@ -618,16 +618,16 @@ import {MY_NAME} from './shared-name'; --- -### Animating reorder of items in a list {/*animating-reorder-of-items-in-a-list*/} +### 목록에서 항목 순서 변경 애니메이션 적용하기 {/*animating-reorder-of-items-in-a-list*/} ```js items.map(item => ) ``` -When reordering a list, without updating the content, the "update" animation triggers on each `` in the list if they're outside a DOM node. Similar to enter/exit animations. +콘텐츠를 업데이트하지 않고 목록 순서를 변경할 때 DOM 노드 밖에 있으면 목록의 각 ``에서 "update" 애니메이션이 발생합니다. enter/exit 애니메이션과 유사합니다. -This means that this will trigger the animation on this ``: +이는 이 ``에서 애니메이션이 발생한다는 의미입니다. ```js function Component() { @@ -831,14 +831,14 @@ button:hover { -However, this wouldn't animate each individual item: +하지만 다음은 각 개별 항목에 애니메이션을 적용하지 않습니다. ```js function Component() { return
...
; } ``` -Instead, any parent `` would cross-fade. If there is no parent `` then there's no animation in that case. +대신 부모 ``이 크로스 페이드됩니다. 부모 ``이 없으면 별도의 애니메이션이 적용되지 않습니다. @@ -1035,33 +1035,33 @@ button:hover { -This means you might want to avoid wrapper elements in lists where you want to allow the Component to control its own reorder animation: +이는 컴포넌트가 자체적으로 순서 변경 애니메이션을 제어할 수 있도록 하고 싶을 때는 리스트 안에 래퍼 요소를 두지 않는 것이 좋다는 뜻입니다. ``` items.map(item =>
) ``` -The above rule also applies if one of the items updates to resize, which then causes the siblings to resize, it'll also animate its sibling `` but only if they're immediate siblings. +위 규칙은 항목 중 하나가 크기 조정을 위해 업데이트되어 형제 항목들이 크기 조정되는 경우에도 적용되며, 이는 형제 ``도 애니메이션시키지만 직접적인 형제인 경우에만 해당합니다. -This means that during an update, which causes a lot of re-layout, it doesn't individually animate every `` on the page. That would lead to a lot of noisy animations which distracts from the actual change. Therefore React is more conservative about when an individual animation triggers. +이것은 업데이트가 발생하여 레이아웃이 크게 변경될 때, 페이지에 있는 모든 ``을 각각 개별적으로 애니메이션하지 않는다는 뜻입니다. 그렇게 하면 실제 변화와 관계없는 많은 산만한 애니메이션이 발생해 주의를 흐트러뜨리게 됩니다. 따라서 React는 개별 애니메이션을 언제 트리거할지에 대해 보다 보수적으로 동작합니다. -It's important to properly use keys to preserve identity when reordering lists. It might seem like you could use "name", shared element transitions, to animate reorders but that would not trigger if one side was outside the viewport. To animate a reorder you often want to show that it went to a position outside the viewport. +목록 순서를 변경할 때 아이덴티티를 보존하기 위해 키를 적절히 사용하는 것이 중요합니다. "name"이나 공유 엘리먼트 Transition을 사용하여 순서 변경을 애니메이션할 수 있을 것 같지만 한쪽이 뷰포트 밖에 있으면 발생하지 않습니다. 리스트를 재정렬하는 애니메이션을 만들 때는, 해당 항목이 화면에 보이지 않는 위치로 이동했음을 사용자에게 보여주는 것이 중요한 경우가 많습니다. --- -### Animating from Suspense content {/*animating-from-suspense-content*/} +### Suspense 콘텐츠에서 애니메이션 적용하기 {/*animating-from-suspense-content*/} -Just like any Transition, React waits for data and new CSS (``) before running the animation. In addition to this, ViewTransitions also wait up to 500ms for new fonts to load before starting the animation to avoid them flickering in later. For the same reason, an image wrapped in ViewTransition will wait for the image to load. +다른 Transition과 마찬가지로 React는 애니메이션을 실행하기 전에 데이터와 새로운 CSS(``)를 기다립니다. 이에 더해 ViewTransition은 새로운 폰트가 나중에 깜빡이는 것을 방지하기 위해 애니메이션을 시작하기 전에 새로운 폰트가 로드될 때까지 최대 500ms까지 기다립니다. 같은 이유로 ViewTransition으로 래핑된 이미지는 이미지가 로드될 때까지 기다립니다. -If it's inside a new Suspense boundary instance, then the fallback is shown first. After the Suspense boundary fully loads, it triggers the `` to animate the reveal to the content. +새로운 Suspense 경계 인스턴스 내부에 있으면 폴백이 먼저 표시됩니다. Suspense 경계가 완전히 로드된 후 ``이 콘텐츠로 전환되는 애니메이션을 실행합니다. -Currently, this only happens for client-side Transition. In the future, this will also animate Suspense boundary for streaming SSR when content from the server suspends during the initial load. +현재 이 동작은 클라이언트 측 Transition에서만 발생합니다. 향후에는 초기 로드 중에 서버의 콘텐츠가 일시 중단될 때 스트리밍 SSR에 대한 Suspense 경계도 애니메이션할 예정입니다. -There are two ways to animate Suspense boundaries depending on where you place the ``: +``을 배치하는 위치에 따라 Suspense 경계를 애니메이션하는 두 가지 방법이 있습니다. Update: @@ -1072,7 +1072,7 @@ Update:
``` -In this scenario when the content goes from A to B, it'll be treated as an "update" and apply that class if appropriate. Both A and B will get the same view-transition-name and therefore they're acting as a cross-fade by default. +이 시나리오에서 콘텐츠가 A에서 B로 바뀔 때 "update"로 처리되며 적절한 경우 해당 클래스를 적용합니다. A와 B 모두 동일한 view-transition-name을 갖게 되므로 기본적으로 크로스 페이드로 작동합니다. @@ -1308,16 +1308,16 @@ Enter/Exit:
``` -In this scenario, these are two separate ViewTransition instances each with their own `view-transition-name`. This will be treated as an "exit" of the `` and an "enter" of the ``. +이 시나리오에서는 각각 고유한 `view-transition-name`을 갖는 두 개의 별도 ViewTransition 인스턴스입니다. 이는 ``의 "exit"와 ``의 "enter"로 처리됩니다. -You can achieve different effects depending on where you choose to place the `` boundary. +`` 경계를 배치하는 위치에 따라 다른 효과를 얻을 수 있습니다. --- -### Opting-out of an animation {/*opting-out-of-an-animation*/} +### 애니메이션 제외하기 {/*opting-out-of-an-animation*/} -Sometimes you're wrapping a large existing component, like a whole page, and you want to animate some updates, such as changing the theme. However, you don't want it to opt-in all updates inside the whole page to cross-fade when they're updating. Especially if you're incrementally adding more animations. +때로는 전체 페이지와 같은 큰 기존 컴포넌트를 래핑하고 테마 변경과 같은 일부 업데이트를 애니메이션하고 싶지만 전체 페이지 내부의 모든 업데이트가 업데이트될 때 크로스 페이드에 포함되는 것을 원하지 않을 수 있습니다. 특히 점진적으로 더 많은 애니메이션을 추가하는 경우에 그렇습니다. -You can use the class "none" to opt-out of an animation. By wrapping your children in a "none" you can disable animations for updates to them while the parent still triggers. +클래스 "none"을 사용하여 애니메이션을 제외할 수 있습니다. 자식을 "none"으로 래핑하면 부모가 여전히 발생하는 동안 자식에 대한 업데이트 애니메이션을 비활성화할 수 있습니다. ```js @@ -1329,17 +1329,17 @@ You can use the class "none" to opt-out of an animation. By wrapping your childr ``` -This will only animate if the theme changes and not if only the children update. The children can still opt-in again with their own `` but at least it's manual again. +이는 테마가 변경될 때만 애니메이션되며 자식만 업데이트될 때는 애니메이션되지 않습니다. 자식은 여전히 자체 ``으로 다시 참여할 수 있지만 최소한 다시 수동으로 제어하는 방식이 됩니다. --- -### Customizing animations {/*customizing-animations*/} +### 애니메이션 커스터마이징 {/*customizing-animations*/} -By default, `` includes the default cross-fade from the browser. +기본적으로 ``은 브라우저의 기본 크로스 페이드를 포함합니다. -To customize animations, you can provide props to the `` component to specify which animations to use, based on how the `` activates. +애니메이션을 커스터마이징하려면 `` 컴포넌트에 props를 제공하여 ``이 활성화되는 방식에 따라 사용할 애니메이션을 지정할 수 있습니다. -For example, we can slow down the default cross fade animation: +예를 들어 기본 크로스 페이드 애니메이션을 느리게 할 수 있습니다. ```js @@ -1347,7 +1347,7 @@ For example, we can slow down the default cross fade animation: ``` -And define slow-fade in CSS using view transition classes: +그리고 View Transition 클래스를 사용하여 CSS에서 slow-fade를 정의합니다. ```css ::view-transition-old(.slow-fade) { @@ -1538,7 +1538,7 @@ button:hover { -In addition to setting the `default`, you can also provide configurations for `enter`, `exit`, `update`, and `share` animations. +`default` 설정 외에도 `enter`, `exit`, `update`, `share` 애니메이션에 대한 구성을 제공할 수 있습니다. @@ -1790,10 +1790,10 @@ button:hover { -### Customizing animations with types {/*customizing-animations-with-types*/} -You can use the [`addTransitionType`](/reference/react/addTransitionType) API to add a class name to the child elements when a specific transition type is activated for a specific activation trigger. This allows you to customize the animation for each type of transition. +### 타입으로 애니메이션 커스터마이징하기 {/*customizing-animations-with-types*/} +특정 활성화 트리거에 대해 특정 Transition 타입이 활성화될 때 자식 엘리먼트에 클래스 이름을 추가하기 위해 [`addTransitionType`](/reference/react/addTransitionType) API를 사용할 수 있습니다. 이를 통해 각 Transition 타입에 대한 애니메이션을 커스터마이징할 수 있습니다. -For example, to customize the animation for all forward and backward navigations: +예를 들어 모든 앞으로 및 뒤로 네비게이션에 대한 애니메이션을 커스터마이징하려면, ```js ...
-// in your router: +// 라우터에서: startTransition(() => { addTransitionType('navigation-' + navigationType); }); ``` -When the ViewTransition activates a "navigation-back" animation, React will add the class name "slide-right". When the ViewTransition activates a "navigation-forward" animation, React will add the class name "slide-left". +ViewTransition이 "navigation-back" 애니메이션을 활성화하면 React는 "slide-right" 클래스 이름을 추가합니다. ViewTransition이 "navigation-forward" 애니메이션을 활성화하면 React는 "slide-left" 클래스 이름을 추가합니다. -In the future, routers and other libraries may add support for standard view-transition types and styles. +향후 라우터와 다른 라이브러리들이 표준 view-transition 타입과 스타일에 대한 지원을 추가할 수 있습니다. @@ -2119,19 +2119,19 @@ button:hover { -### Building View Transition enabled routers {/*building-view-transition-enabled-routers*/} +### View Transition 지원 라우터 구축하기 {/*building-view-transition-enabled-routers*/} -React waits for any pending Navigation to finish to ensure that scroll restoration happens within the animation. If the Navigation is blocked on React, your router must unblock in `useLayoutEffect` since `useEffect` would lead to a deadlock. +스크롤 복원이 애니메이션 중에 정상적으로 동작하도록, React는 대기 중인 내비게이션이 완료될 때까지 기다립니다. 네비게이션이 React에서 차단되는 경우 `useEffect`는 교착 상태로 이어질 수 있으므로 라우터는 `useLayoutEffect`에서 차단을 해제해야 합니다. -If a `startTransition` is started from the legacy popstate event, such as during a "back"-navigation then it must finish synchronously to ensure scroll and form restoration works correctly. This is in conflict with running a View Transition animation. Therefore, React will skip animations from popstate. Therefore animations won't run for the back button. You can fix this by upgrading your router to use the Navigation API. +"뒤로" 네비게이션 중처럼 레거시 popstate 이벤트에서 `startTransition`이 시작되면 스크롤과 폼 복원이 올바르게 작동하도록 동기적으로 완료되어야 합니다. 이는 View Transition 애니메이션 실행과 충돌합니다. 따라서 React는 popstate에서 애니메이션을 건너뜁니다. 따라서 뒤로 버튼에 대해서는 애니메이션이 실행되지 않습니다. Navigation API를 사용하도록 라우터를 업그레이드하여 이를 해결할 수 있습니다. --- -## Troubleshooting {/*troubleshooting*/} +## 문제 해결 {/*troubleshooting*/} -### My `` is not activating {/*my-viewtransition-is-not-activating*/} +### ``이 활성화되지 않습니다 {/*my-viewtransition-is-not-activating*/} -`` only activates if it is placed is before any DOM node: +``은 DOM 노드보다 앞에 배치되어야만 활성화됩니다. ```js [3, 5] function Component() { @@ -2143,7 +2143,7 @@ function Component() { } ``` -To fix, ensure that the `` comes before any other DOM nodes: +해결하려면 ``이 다른 DOM 노드보다 앞에 오도록 하세요. ```js [3, 5] function Component() { @@ -2155,14 +2155,14 @@ function Component() { } ``` -### I'm getting an error "There are two `` components with the same name mounted at the same time." {/*two-viewtransition-with-same-name*/} +### "동일한 이름으로 마운트된 `` 컴포넌트가 두 개 있습니다."라는 오류가 발생합니다 {/*two-viewtransition-with-same-name*/} -This error occurs when two `` components with the same `name` are mounted at the same time: +이 오류는 동일한 `name`을 가진 두 개의 `` 컴포넌트가 동시에 마운트될 때 발생합니다. ```js [3] function Item() { - // 🚩 All items will get the same "name". + // 🚩 모든 항목이 동일한 "name"을 갖게 됩니다. return ...; } @@ -2175,7 +2175,7 @@ function ItemList({items}) { } ``` -This will cause the View Transition to error. In development, React detects this issue to surface it and logs two errors: +이는 View Transition에서 오류를 발생시킵니다. 개발 중에 React는 이 문제를 감지하여 표면화하고 두 개의 오류를 기록합니다. @@ -2195,11 +2195,11 @@ The existing `` duplicate has this stack trace. -To fix, ensure that there's only one `` with the same name mounted at a time in the entire app by ensuring the `name` is unique, or adding an `id` to the name: +해결하려면 `name`이 고유하도록 하거나 이름에 `id`를 추가하여 전체 앱에서 동일한 이름을 가진 ``이 한 번에 하나만 마운트되도록 하세요. ```js [3] function Item({id}) { - // ✅ All items will get the same "name". + // ✅ 모든 항목이 고유한 "name"을 갖게 됩니다. return ...; } From fd7099a1946e61bf6e5d1a678ed48e8da9e413c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 7 Jul 2025 17:37:52 +0900 Subject: [PATCH 017/368] Update scaling-up-with-reducer-and-context.md --- src/content/learn/scaling-up-with-reducer-and-context.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/content/learn/scaling-up-with-reducer-and-context.md b/src/content/learn/scaling-up-with-reducer-and-context.md index 004efa619..38c6f877f 100644 --- a/src/content/learn/scaling-up-with-reducer-and-context.md +++ b/src/content/learn/scaling-up-with-reducer-and-context.md @@ -685,11 +685,7 @@ ul, li { margin: 0; padding: 0; } ``` -<<<<<<< HEAD 대신 필요한 컴포넌트에서는 `TaskContext`에서 `tasks` 리스트를 읽을 수 있습니다. -======= -Instead, any component that needs the task list can read it from the `TasksContext`: ->>>>>>> 341c312916e1b657262bbe14b134a6f1779fecf1 ```js {2} export default function TaskList() { From e1b6762d7cae9791672959e8887d0a314d01a7a2 Mon Sep 17 00:00:00 2001 From: HWANG JUN HYEOK Date: Wed, 9 Jul 2025 00:55:12 +0900 Subject: [PATCH 018/368] docs: fix typo in `creating-a-react-app.md` (#1232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # "새로운 React 앱 만들기" 페이지의 React Router 설명에서 한국어 맞춤법 오타를 수정했습니다. (#1231) ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --- src/content/learn/creating-a-react-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/creating-a-react-app.md b/src/content/learn/creating-a-react-app.md index 2bc057c49..622857ded 100644 --- a/src/content/learn/creating-a-react-app.md +++ b/src/content/learn/creating-a-react-app.md @@ -36,7 +36,7 @@ Next.js는 [Vercel](https://vercel.com/)에서 유지 관리합니다. [Next.js ### React Router (v7) {/*react-router-v7*/} -**[React Router](https://reactrouter.com/start/framework/installation)는 React에서 가장 인기인는 라우팅 라이브러리이며 Vite와 함께 사용하면 풀스택 React 프레임워크를 만들 수 있습니다**. 표준 Web API를 강조하고 다양한 자바스크립트 런타임과 플랫폼을 위한 [준비된 배포 템플릿](https://github.com/remix-run/react-router-templates)이 있습니다. +**[React Router](https://reactrouter.com/start/framework/installation)는 React에서 가장 인기 있는 라우팅 라이브러리이며 Vite와 함께 사용하면 풀스택 React 프레임워크를 만들 수 있습니다**. 표준 Web API를 강조하고 다양한 자바스크립트 런타임과 플랫폼을 위한 [준비된 배포 템플릿](https://github.com/remix-run/react-router-templates)이 있습니다. 새로운 React Router 프레임워크를 생성하려면 다음 명령을 사용하세요. From 5f7a10d2405b94fe24b5d15b32c6145ff8f450e9 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:05:22 +0900 Subject: [PATCH 019/368] docs: Korean translation of React Labs blog post: View Transitions, Activity and more (#1230) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR translates the React Labs blog post "View Transitions, Activity, and more" from English to Korean following the established translation guidelines and glossary. ## Changes Made - **Complete translation** of `src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md` - **Preserved MDX syntax** and code blocks as required - **Applied translation glossary** consistently for technical terms - **Maintained Korean writing style** consistent with existing translated content ## Translation Guidelines Followed - Used formal Korean writing style (합니다/습니다 endings) - Applied translations from `wiki/translate-glossary.md` and `wiki/translate-glossary-legacy.md` - Kept technical terms untranslated where specified (React, props, state, etc.) - Followed `CONTRIBUTING.md` style guidelines - Preserved all markdown/MDX formatting and code examples ## Key Sections Translated - **New Experimental Features**: View Transitions and Activity APIs - **Features in Development**: React Performance Tracks, Automatic Effect Dependencies, Compiler IDE Extension, Fragment Refs, Gesture Animations, Concurrent Stores - **Technical explanations** using proper Korean terminology per established glossary - **React Conf 2025 announcement** and call for speakers ## Quality Assurance - ✅ Build passes successfully with no syntax errors - ✅ Korean text follows established conventions from existing translated content - ✅ All technical terms translated consistently per glossary - ✅ MDX components and code blocks preserved intact - ✅ Links and references maintained correctly The translation maintains the technical accuracy while making the content accessible to Korean-speaking React developers, following the same high standards established in other translated React documentation. > [!WARNING] > >
> Firewall rules blocked me from connecting to one or more addresses > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `conf.reactjs.org` > - Triggering command: `curl REDACTED --output public/fonts/Optimistic_Display_Arbc_W_Bd.woff2` (dns block) > - Triggering command: `curl REDACTED --output public/fonts/Optimistic_Display_Arbc_W_Md.woff2` (dns block) > - Triggering command: `curl REDACTED --output public/fonts/Optimistic_Display_Cyrl_W_Bd.woff2` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to my [firewall allow list](https://gh.io/copilot/firewall-config) > >
--- 💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to start the survey. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lumirlumir <119669540+lumirlumir@users.noreply.github.com> Co-authored-by: 루밀LuMir --- ...labs-view-transitions-activity-and-more.md | 152 +++++++++--------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md b/src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md index e4bb25a4a..c725e13f2 100644 --- a/src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md +++ b/src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md @@ -1,37 +1,37 @@ --- -title: "React Labs: View Transitions, Activity, and more" +title: "React Labs: View Transitions, Activity 그리고 그 외" author: Ricky Hanlon date: 2025/04/23 -description: In React Labs posts, we write about projects in active research and development. In this post, we're sharing two new experimental features that are ready to try today, and updates on other areas we're working on now. +description: React Labs 게시글에는 활발히 연구 개발 중인 프로젝트에 대한 내용을 작성합니다. 이번 게시글에서는 오늘 바로 사용해볼 수 있는 두 가지 새로운 실험적 기능과 현재 작업 중인 다른 영역의 업데이트를 공유합니다. --- -April 23, 2025 by [Ricky Hanlon](https://twitter.com/rickhanlonii) +2025년 4월 23일, [Ricky Hanlon](https://twitter.com/rickhanlonii) --- -In React Labs posts, we write about projects in active research and development. In this post, we're sharing two new experimental features that are ready to try today, and updates on other areas we're working on now. +React Labs 게시글에는 활발히 연구 개발 중인 프로젝트에 대한 내용을 작성합니다. 이번 게시글에서는 오늘 바로 사용해볼 수 있는 두 가지 새로운 실험적 기능과 현재 작업 중인 다른 영역의 업데이트를 공유합니다. -React Conf 2025 is scheduled for October 7–8 in Henderson, Nevada! +React Conf 2025가 네바다주 헨더슨에서 10월 7-8일에 개최될 예정입니다! -We're looking for speakers to help us create talks about the features covered in this post. If you're interested in speaking at ReactConf, [please apply here](https://forms.reform.app/react-conf/call-for-speakers/) (no talk proposal required). +이번 게시글에서 다루는 기능들에 대한 발표를 준비해주실 연사분들을 찾고 있습니다. ReactConf에서 발표에 관심이 있으시다면 [여기에서 지원해주세요](https://forms.reform.app/react-conf/call-for-speakers/) (발표 제안서 제출은 필요하지 않습니다). -For more info on tickets, free streaming, sponsoring, and more, see [the React Conf website](https://conf.react.dev). +티켓, 무료 스트리밍, 후원 등에 대한 더 많은 정보는 [React Conf 웹사이트](https://conf.react.dev)를 참고하세요. -Today, we're excited to release documentation for two new experimental features that are ready for testing: +오늘 저희는 테스트할 준비가 완료된 두 가지 새로운 실험적 기능에 대한 문서를 공개하게 되어 기쁩니다. - [View Transitions](#view-transitions) - [Activity](#activity) -We're also sharing updates on new features currently in development: +또한 현재 개발 중인 새로운 기능들에 대한 업데이트도 공유합니다. - [React Performance Tracks](#react-performance-tracks) - [Compiler IDE Extension](#compiler-ide-extension) - [Automatic Effect Dependencies](#automatic-effect-dependencies) @@ -40,40 +40,40 @@ We're also sharing updates on new features currently in development: --- -# New Experimental Features {/*new-experimental-features*/} +# 새로운 실험적 기능 {/*new-experimental-features*/} -View Transitions and Activity are now ready for testing in `react@experimental`. These features have been tested in production and are stable, but the final API may still change as we incorporate feedback. +View Transitions와 Activity는 이제 `react@experimental`에서 테스트할 준비가 되었습니다. 이러한 기능들은 프로덕션에서 테스트되었으며 안정적이지만, 피드백을 반영하는 과정에서 최종 API가 여전히 변경될 수 있습니다. -You can try them by upgrading React packages to the most recent experimental version: +가장 최신 실험적 버전으로 React 패키지를 업그레이드하여 사용해볼 수 있습니다. - `react@experimental` - `react-dom@experimental` -Read on to learn how to use these features in your app, or check out the newly published docs: +앱에서 이러한 기능을 사용하는 방법을 알아보려면 계속 읽어보시거나, 새로 공개된 문서를 확인해보세요. -- [``](/reference/react/ViewTransition): A component that lets you activate an animation for a Transition. -- [`addTransitionType`](/reference/react/addTransitionType): A function that allows you to specify the cause of a Transition. -- [``](/reference/react/Activity): A component that lets you hide and show parts of the UI. +- [``](/reference/react/ViewTransition): Transition에 애니메이션을 활성화할 수 있는 컴포넌트입니다. +- [`addTransitionType`](/reference/react/addTransitionType): Transition의 원인을 지정할 수 있는 함수입니다. +- [``](/reference/react/Activity): UI의 일부를 숨기거나 보여줄 수 있는 컴포넌트입니다. ## View Transitions {/*view-transitions*/} -React View Transitions are a new experimental feature that makes it easier to add animations to UI transitions in your app. Under-the-hood, these animations use the new [`startViewTransition`](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) API available in most modern browsers. +React View Transitions는 앱의 UI 전환에 애니메이션을 더 쉽게 추가할 수 있게 해주는 새로운 실험적 기능입니다. 내부적으로, 이러한 애니메이션은 대부분의 최신 브라우저에서 사용할 수 있는 새로운 [`startViewTransition`](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) API를 사용합니다. -To opt-in to animating an element, wrap it in the new `` component: +엘리먼트의 애니메이션을 활성화하려면, 새로운 `` 컴포넌트로 감싸주세요. ```js -// "what" to animate. +// 애니메이션할 "대상"
animate me
``` -This new component lets you declaratively define "what" to animate when an animation is activated. +이 새로운 컴포넌트를 사용하면 애니메이션이 활성화될 때 무엇을 애니메이션할지 선언적으로 정의할 수 있습니다. -You can define "when" to animate by using one of these three triggers for a View Transition: +View Transition에 대한 다음 세 가지 트리거 중 하나를 사용해서 "언제" 애니메이션할지 정의할 수 있습니다. ```js -// "when" to animate. +// 애니메이션할 "시점" // Transitions startTransition(() => setState(...)); @@ -87,10 +87,10 @@ const deferred = useDeferredValue(value); ``` -By default, these animations use the [default CSS animations for View Transitions](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#customizing_your_animations) applied (typically a smooth cross-fade). You can use [view transition pseudo-selectors](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#the_view_transition_pseudo-element_tree) to define "how" the animation runs. For example, you can use `*` to change the default animation for all transitions: +기본적으로, 이러한 애니메이션은 [View Transitions의 기본 CSS 애니메이션](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#customizing_your_animations)이 적용됩니다 (일반적으로 부드러운 크로스 페이드). [view transition 의사 선택자](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API/Using#the_view_transition_pseudo-element_tree)를 사용해서 애니메이션이 "어떻게" 실행될지 정의할 수 있습니다. 예를 들어, `*`를 사용해서 모든 전환에 대한 기본 애니메이션을 변경할 수 있습니다. ``` -// "how" to animate. +// 애니메이션하는 "방법" ::view-transition-old(*) { animation: 300ms ease-out fade-out; } @@ -99,16 +99,16 @@ By default, these animations use the [default CSS animations for View Transition } ``` -When the DOM updates due to an animation trigger—like `startTransition`, `useDeferredValue`, or a `Suspense` fallback switching to content—React will use [declarative heuristics](/reference/react/ViewTransition#viewtransition) to automatically determine which `` components to activate for the animation. The browser will then run the animation that's defined in CSS. +`startTransition`, `useDeferredValue`, 또는 `Suspense` 폴백이 콘텐츠로 전환되는 것과 같은 애니메이션 트리거로 인해 DOM이 업데이트되면, React는 [선언적 휴리스틱](/reference/react/ViewTransition#viewtransition)을 사용해서 애니메이션을 위해 활성화할 `` 컴포넌트를 자동으로 결정합니다. 그러면 브라우저가 CSS에서 정의된 애니메이션을 실행합니다. -If you're familiar with the browser's View Transition API and want to know how React supports it, check out [How does `` Work](/reference/react/ViewTransition#how-does-viewtransition-work) in the docs. +브라우저의 View Transition API에 익숙하고 React가 이를 어떻게 지원하는지 알고 싶다면, 문서의 [How does `` Work](/reference/react/ViewTransition#how-does-viewtransition-work)를 확인해보세요. -In this post, let's take a look at a few examples of how to use View Transitions. +이번 게시글에서는 View Transitions를 사용하는 몇 가지 예시를 살펴보겠습니다. -We'll start with this app, which doesn't animate any of the following interactions: -- Click a video to view the details. -- Click "back" to go back to the feed. -- Type in the list to filter the videos. +다음과 같은 상호작용을 애니메이션하지 않는 앱부터 시작하겠습니다. +- 비디오를 클릭해서 세부 정보를 봅니다. +- "back"을 클릭해서 피드로 돌아갑니다. +- 목록에서 타이핑해서 비디오를 필터링합니다. @@ -1264,17 +1264,17 @@ root.render( -#### View Transitions do not replace CSS and JS driven animations {/*view-transitions-do-not-replace-css-and-js-driven-animations*/} +#### View Transitions는 CSS와 JS 기반 애니메이션을 대체하지 않습니다 {/*view-transitions-do-not-replace-css-and-js-driven-animations*/} -View Transitions are meant to be used for UI transitions such as navigation, expanding, opening, or re-ordering. They are not meant to replace all the animations in your app. +View Transitions는 네비게이션, 확장, 열기, 재정렬과 같은 UI 전환에 사용하기 위한 것입니다. 앱의 모든 애니메이션을 대체하기 위한 것은 아닙니다. -In our example app above, notice that there are already animations when you click the "like" button and in the Suspense fallback glimmer. These are good use cases for CSS animations because they are animating a specific element. +위 예시 앱에서 "like" 버튼을 클릭할 때와 Suspense 폴백 반짝임에 이미 애니메이션이 있는 것을 확인할 수 있습니다. 이들은 특정 엘리먼트를 애니메이션하기 때문에 CSS 애니메이션의 좋은 사용 사례입니다. -### Animating navigations {/*animating-navigations*/} +### 네비게이션 애니메이션 {/*animating-navigations*/} -Our app includes a Suspense-enabled router, with [page transitions already marked as Transitions](/reference/react/useTransition#building-a-suspense-enabled-router), which means navigations are performed with `startTransition`: +저희 앱에는 Suspense가 활성화된 라우터가 포함되어 있으며, [페이지 전환이 이미 Transitions로 표시되어 있습니다](/reference/react/useTransition#building-a-suspense-enabled-router). 이는 네비게이션이 `startTransition`으로 수행된다는 의미입니다. ```js function navigate(url) { @@ -1284,19 +1284,19 @@ function navigate(url) { } ``` -`startTransition` is a View Transition trigger, so we can add `` to animate between pages: +`startTransition`은 View Transition 트리거이므로, 페이지 간 애니메이션을 위해 ``을 추가할 수 있습니다: ```js -// "what" to animate +// 애니메이션할 "대상" {url === '/' ? : } ``` -When the `url` changes, the `` and new route are rendered. Since the `` was updated inside of `startTransition`, the `` is activated for an animation. +`url`이 변경되면, ``과 새로운 라우트가 렌더링됩니다. ``이 `startTransition` 내부에서 업데이트되었으므로, ``이 애니메이션을 위해 활성화됩니다. -By default, View Transitions include the browser default cross-fade animation. Adding this to our example, we now have a cross-fade whenever we navigate between pages: +기본적으로, View Transitions는 브라우저 기본 크로스 페이드 애니메이션을 포함합니다. 이를 예시에 추가하면, 이제 페이지 간 네비게이션할 때마다 크로스 페이드가 적용됩니다. @@ -14210,21 +14210,21 @@ These are areas we're still exploring, and we'll share more as we make progress. --- -# Features in development {/*features-in-development*/} +# 개발 중인 기능 {/*features-in-development*/} -We're also developing features to help solve the common problems below. +저희는 아래의 일반적인 문제들을 해결하는 데 도움이 되는 기능들도 개발하고 있습니다. -As we iterate on possible solutions, you may see some potential APIs we're testing being shared based on the PRs we are landing. Please keep in mind that as we try different ideas, we often change or remove different solutions after trying them out. +가능한 솔루션을 반복 개발하면서, 저희가 진행하고 있는 PR을 기반으로 테스트 중인 잠재적 API들이 공유되는 것을 보실 수 있습니다. 다양한 아이디어를 시도하면서, 시도해본 후 다른 솔루션을 자주 변경하거나 제거한다는 점을 기억해 주세요. -When the solutions we're working on are shared too early, it can create churn and confusion in the community. To balance being transparent and limiting confusion, we're sharing the problems we're currently developing solutions for, without sharing a particular solution we have in mind. +저희가 작업하고 있는 솔루션을 너무 일찍 공유하면, 커뮤니티에 혼란과 혼동을 일으킬 수 있습니다. 투명성과 혼란 제한 사이의 균형을 맞추기 위해, 염두에 두고 있는 특정 솔루션을 공유하지 않고 현재 솔루션을 개발하고 있는 문제들을 공유합니다. -As these features progress, we'll announce them on the blog with docs included so you can try them out. +이러한 기능들이 진전을 보이면, 여러분이 시도해볼 수 있도록 문서와 함께 블로그에서 발표하겠습니다. ## React Performance Tracks {/*react-performance-tracks*/} -We're working on a new set of custom tracks to performance profilers using browser APIs that [allow adding custom tracks](https://developer.chrome.com/docs/devtools/performance/extension) to provide more information about the performance of your React app. +React 앱의 성능에 대한 더 많은 정보를 제공하기 위해 [커스텀 트랙 추가를 허용하는](https://developer.chrome.com/docs/devtools/performance/extension) 브라우저 API를 사용하여 성능 프로파일러에 새로운 커스텀 트랙 세트를 작업하고 있습니다. -This feature is still in progress, so we're not ready to publish docs to fully release it as an experimental feature yet. You can get a sneak preview when using an experimental version of React, which will automatically add the performance tracks to profiles: +이 기능은 아직 진행 중이므로, 실험적 기능으로 완전히 출시하기 위한 문서를 발행할 준비가 되지 않았습니다. React의 실험적 버전을 사용하면 미리 보기를 할 수 있으며, 이는 자동으로 프로필에 성능 트랙을 추가합니다.
@@ -14237,31 +14237,31 @@ This feature is still in progress, so we're not ready to publish docs to fully r
-There are a few known issues we plan to address such as performance, and the scheduler track not always "connecting" work across Suspended trees, so it's not quite ready to try. We're also still collecting feedback from early adopters to improve the design and usability of the tracks. +성능과 스케줄러 트랙이 일시 중단된 트리에서 작업을 항상 "연결"하지 않는 등 해결할 계획인 몇 가지 알려진 문제들이 있어서, 아직 시도할 준비가 완전히 되지 않았습니다. 또한 트랙의 디자인과 사용성을 개선하기 위해 얼리 어답터들로부터 피드백을 계속 수집하고 있습니다. -Once we solve those issues, we'll publish experimental docs and share that it's ready to try. +이러한 문제들을 해결하면, 실험적 문서를 발행하고 시도할 준비가 되었다고 공유하겠습니다. --- ## Automatic Effect Dependencies {/*automatic-effect-dependencies*/} -When we released hooks, we had three motivations: +hooks를 출시했을 때, 저희는 세 가지 동기가 있었습니다: -- **Sharing code between components**: hooks replaced patterns like render props and higher-order components to allow you to reuse stateful logic without changing your component hierarchy. -- **Think in terms of function, not lifecycles**: hooks let you split one component into smaller functions based on what pieces are related (such as setting up a subscription or fetching data), rather than forcing a split based on lifecycle methods. -- **Support ahead-of-time compilation**: hooks were designed to support ahead-of-time compilation with less pitfalls causing unintentional de-optimizations caused by lifecycle methods, and limitations of classes. +- **컴포넌트 간 코드 공유**: hooks는 렌더링 props와 고차 컴포넌트 같은 패턴을 대체하여 컴포넌트 계층을 변경하지 않고도 상태가 있는 로직을 재사용할 수 있게 해주었습니다. +- **생명주기가 아닌 함수의 관점에서 사고**: hooks는 생명주기 메서드를 기반으로 한 분할을 강제하는 것이 아니라 관련된 부분(구독 설정이나 데이터 가져오기 등)을 기반으로 하나의 컴포넌트를 더 작은 함수로 분할할 수 있게 해주었습니다. +- **사전 컴파일 지원**: hooks는 생명주기 메서드로 인한 의도하지 않은 최적화 해제 문제와 클래스의 제약사항을 줄이면서 사전 컴파일을 지원하도록 설계되었습니다. -Since their release, hooks have been successful at *sharing code between components*. Hooks are now the favored way to share logic between components, and there are less use cases for render props and higher order components. Hooks have also been successful at supporting features like Fast Refresh that were not possible with class components. +출시 이후 hooks는 *컴포넌트 간 코드 공유*에서 성공적이었습니다. Hooks는 이제 컴포넌트 간 로직을 공유하는 선호되는 방법이 되었고, 렌더링 props와 고차 컴포넌트의 사용 사례는 줄어들었습니다. Hooks는 또한 클래스 컴포넌트로는 불가능했던 Fast Refresh와 같은 기능을 지원하는 데도 성공적이었습니다. -### Effects can be hard {/*effects-can-be-hard*/} +### Effects는 어려울 수 있습니다 {/*effects-can-be-hard*/} -Unfortunately, some hooks are still hard to think in terms of function instead of lifecycles. Effects specifically are still hard to understand and are the most common pain point we hear from developers. Last year, we spent a significant amount of time researching how Effects were used, and how those use cases could be simplified and easier to understand. +안타깝게도, 일부 hooks는 여전히 생명주기 대신 함수의 관점에서 사고하기 어렵습니다. 특히 Effects는 여전히 이해하기 어렵고 개발자들로부터 듣는 가장 일반적인 고민거리입니다. 작년에 저희는 Effects가 어떻게 사용되는지, 그리고 이러한 사용 사례가 어떻게 단순화되고 이해하기 쉬워질 수 있는지에 대해 상당한 시간을 연구했습니다. -We found that often, the confusion is from using an Effect when you don't need to. The [You Might Not Need an Effect](/learn/you-might-not-need-an-effect) guide covers many cases for when Effects are not the right solution. However, even when an Effect is the right fit for a problem, Effects can still be harder to understand than class component lifecycles. +종종 혼란은 필요하지 않을 때 Effect를 사용하는 데서 온다는 것을 발견했습니다. [You Might Not Need an Effect](/learn/you-might-not-need-an-effect) 가이드는 Effects가 올바른 솔루션이 아닌 경우들을 많이 다루고 있습니다. 하지만 Effect가 문제에 적합한 해결책일 때조차도, Effects는 클래스 컴포넌트 생명주기보다 여전히 이해하기 어려울 수 있습니다. -We believe one of the reasons for confusion is that developers to think of Effects from the _component's_ perspective (like a lifecycle), instead of the _Effects_ point of view (what the Effect does). +혼란의 이유 중 하나는 개발자들이 _Effects_ 관점(Effect가 무엇을 하는지)이 아니라 _컴포넌트의_ 관점(생명주기 같은)에서 Effects를 생각하기 때문이라고 생각합니다. -Let's look at an example [from the docs](/learn/lifecycle-of-reactive-effects#thinking-from-the-effects-perspective): +[문서의 예시](/learn/lifecycle-of-reactive-effects#thinking-from-the-effects-perspective)를 살펴보겠습니다: ```js useEffect(() => { @@ -14275,15 +14275,15 @@ useEffect(() => { }, [roomId]); ``` -Many users would read this code as "on mount, connect to the roomId. whenever `roomId` changes, disconnect to the old room and re-create the connection". However, this is thinking from the component's lifecycle perspective, which means you will need to think of every component lifecycle state to write the Effect correctly. This can be difficult, so it's understandable that Effects seem harder than class lifecycles when using the component perspective. +많은 사용자들은 이 코드를 "마운트 시에 roomId에 연결하고, `roomId`가 변경될 때마다 이전 방으로부터 연결을 해제하고 새로운 연결을 생성한다"고 읽을 것입니다. 하지만 이는 컴포넌트의 생명주기 관점에서 생각하는 것이며, 이는 Effect를 올바르게 작성하기 위해 모든 컴포넌트 생명주기 상태를 생각해야 한다는 의미입니다. 이는 어려울 수 있으므로, 컴포넌트 관점을 사용할 때 Effects가 클래스 생명주기보다 어려워 보이는 것이 이해할 만합니다. -### Effects without dependencies {/*effects-without-dependencies*/} +### 의존성 없는 Effects {/*effects-without-dependencies*/} -Instead, it's better to think from the Effect's perspective. The Effect doesn't know about the component lifecycles. It only describes how to start synchronization and how to stop it. When users think of Effects in this way, their Effects tend to be easier to write, and more resilient to being started and stopped as many times as is needed. +대신 Effect의 관점에서 생각하는 것이 좋습니다. Effect는 컴포넌트 생명주기에 대해 알지 못합니다. 단지 동기화를 시작하는 방법과 중지하는 방법만 설명합니다. 사용자가 이런 식으로 Effects를 생각할 때, 그들의 Effects는 작성하기 더 쉬워지고, 필요한 만큼 여러 번 시작되고 중지되는 것에 더 탄력적이 됩니다. -We spent some time researching why Effects are thought of from the component perspective, and we think one of the reasons is the dependency array. Since you have to write it, it's right there and in your face reminding you of what you're "reacting" to and baiting you into the mental model of 'do this when these values change'. +Effects가 컴포넌트 관점에서 생각되는 이유를 연구하는 데 시간을 보냈고, 그 이유 중 하나가 의존성 배열이라고 생각합니다. 작성해야 하므로, 바로 거기에 있고 여러분이 무엇에 "반응"하고 있는지를 상기시키며 '이 값들이 변경될 때 이것을 하라'는 멘탈 모델로 유도합니다. -When we released hooks, we knew we could make them easier to use with ahead-of-time compilation. With the React Compiler, you're now able to avoid writing `useCallback` and `useMemo` yourself in most cases. For Effects, the compiler can insert the dependencies for you: +hooks를 출시할 때, 사전 컴파일로 사용하기 더 쉽게 만들 수 있다는 것을 알고 있었습니다. React Compiler를 사용하면, 이제 대부분의 경우 `useCallback`과 `useMemo`를 직접 작성하는 것을 피할 수 있습니다. Effects의 경우, 컴파일러가 의존성을 자동으로 삽입할 수 있습니다: ```js useEffect(() => { @@ -14292,42 +14292,42 @@ useEffect(() => { return () => { connection.disconnect(); }; -}); // compiler inserted dependencies. +}); // 컴파일러가 의존성을 삽입했습니다. ``` -With this code, the React Compiler can infer the dependencies for you and insert them automatically so you don't need to see or write them. With features like [the IDE extension](#compiler-ide-extension) and [`useEffectEvent`](/reference/react/experimental_useEffectEvent), we can provide a CodeLens to show you what the Compiler inserted for times you need to debug, or to optimize by removing a dependency. This helps reinforce the correct mental model for writing Effects, which can run at any time to synchronize your component or hook's state with something else. +이 코드를 사용하면, React Compiler가 의존성을 추론하고 자동으로 삽입하므로 보거나 작성할 필요가 없습니다. [IDE 확장 프로그램](#compiler-ide-extension)과 [`useEffectEvent`](/reference/react/experimental_useEffectEvent) 같은 기능을 통해, 디버깅이 필요한 시점이나 의존성을 제거하여 최적화할 때 Compiler가 삽입한 것을 보여주는 CodeLens를 제공할 수 있습니다. 이는 언제든지 실행되어 컴포넌트나 hook의 상태를 다른 것과 동기화할 수 있는 Effects를 작성하는 올바른 멘탈 모델을 강화하는 데 도움이 됩니다. -Our hope is that automatically inserting dependencies is not only easier to write, but that it also makes them easier to understand by forcing you to think in terms of what the Effect does, and not in component lifecycles. +저희의 희망은 의존성을 자동으로 삽입하는 것이 작성하기 더 쉬울 뿐만 아니라, 컴포넌트 생명주기가 아닌 Effect가 하는 일의 관점에서 생각하도록 강제함으로써 이해하기도 더 쉽게 만든다는 것입니다. --- ## Compiler IDE Extension {/*compiler-ide-extension*/} -Earlier this week [we shared](/blog/2025/04/21/react-compiler-rc) the React Compiler release candidate, and we're working towards shipping the first SemVer stable version of the compiler in the coming months. +이번 주 초에 [React Compiler 릴리스 후보를 공유했으며](/blog/2025/04/21/react-compiler-rc), 앞으로 몇 달 안에 컴파일러의 첫 번째 SemVer 안정 버전을 출시하기 위해 작업하고 있습니다. -We've also begun exploring ways to use the React Compiler to provide information that can improve understanding and debugging your code. One idea we've started exploring is a new experimental LSP-based React IDE extension powered by React Compiler, similar to the extension used in [Lauren Tan's React Conf talk](https://conf2024.react.dev/talks/5). +또한 React Compiler를 사용해서 코드 이해와 디버깅을 향상시킬 수 있는 정보를 제공하는 방법을 탐구하기 시작했습니다. 저희가 탐구하기 시작한 아이디어 중 하나는 [Lauren Tan의 React Conf 발표](https://conf2024.react.dev/talks/5)에서 사용된 확장 프로그램과 유사한, React Compiler를 기반으로 하는 새로운 실험적 LSP 기반 React IDE 확장 프로그램입니다. -Our idea is that we can use the compiler's static analysis to provide more information, suggestions, and optimization opportunities directly in your IDE. For example, we can provide diagnostics for code breaking the Rules of React, hovers to show if components and hooks were optimized by the compiler, or a CodeLens to see [automatically inserted Effect dependencies](#automatic-effect-dependencies). +저희의 아이디어는 컴파일러의 정적 분석을 사용해서 IDE에서 직접 더 많은 정보, 제안, 최적화 기회를 제공할 수 있다는 것입니다. 예를 들어, React의 규칙을 위반하는 코드에 대한 진단을 제공하거나, 컴포넌트와 hooks가 컴파일러에 의해 최적화되었는지 보여주는 호버, 또는 [자동으로 삽입된 Effect 의존성](#automatic-effect-dependencies)을 볼 수 있는 CodeLens를 제공할 수 있습니다. -The IDE extension is still an early exploration, but we'll share our progress in future updates. +IDE 확장 프로그램은 아직 초기 탐구 단계이지만, 향후 업데이트에서 진행 상황을 공유하겠습니다. --- ## Fragment Refs {/*fragment-refs*/} -Many DOM APIs like those for event management, positioning, and focus are difficult to compose when writing with React. This often leads developers to reach for Effects, managing multiple Refs, by using APIs like `findDOMNode` (removed in React 19). +이벤트 관리, 위치 지정, 포커스를 위한 DOM API들은 React로 작성할 때 구성하기 어렵습니다. 이는 종종 개발자들이 Effects에 의존하거나, 여러 Refs를 관리하거나, `findDOMNode`(React 19에서 제거됨)와 같은 API를 사용하게 만듭니다. -We are exploring adding refs to Fragments that would point to a group of DOM elements, rather than just a single element. Our hope is that this will simplify managing multiple children and make it easier to write composable React code when calling DOM APIs. +저희는 단일 엘리먼트가 아닌 DOM 엘리먼트 그룹을 가리키는 Fragments에 refs를 추가하는 것을 탐구하고 있습니다. 저희의 희망은 이것이 여러 자식을 관리하는 것을 단순화하고 DOM API를 호출할 때 구성 가능한 React 코드를 작성하기 더 쉽게 만드는 것입니다. -Fragment refs are still being researched. We'll share more when we're closer to having the final API finished. +Fragment refs는 아직 연구 중입니다. 최종 API가 완성에 가까워지면 더 많은 내용을 공유하겠습니다. --- ## Gesture Animations {/*gesture-animations*/} -We're also researching ways to enhance View Transitions to support gesture animations such as swiping to open a menu, or scroll through a photo carousel. +저희는 또한 메뉴를 열기 위한 스와이프나 사진 캐러셀을 스크롤하는 것과 같은 제스처 애니메이션을 지원하기 위해 View Transitions를 향상시키는 방법을 연구하고 있습니다. -Gestures present new challenges for a few reasons: +제스처는 몇 가지 이유로 새로운 도전을 제시합니다: - **Gestures are continuous**: as you swipe the animation is tied to your finger placement time, rather than triggering and running to completion. - **Gestures don't complete**: when you release your finger gesture animations can run to completion, or revert to their original state (like when you only partially open a menu) depending on how far you go. From 48460207db61a657b31e57b9cbf7356b3a531555 Mon Sep 17 00:00:00 2001 From: Ricky Date: Wed, 9 Jul 2025 11:37:57 -0400 Subject: [PATCH 020/368] fix flushSync link (#7862) --- src/content/reference/react-dom/client/createRoot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react-dom/client/createRoot.md b/src/content/reference/react-dom/client/createRoot.md index adc6a8d37..cb533ec78 100644 --- a/src/content/reference/react-dom/client/createRoot.md +++ b/src/content/reference/react-dom/client/createRoot.md @@ -90,7 +90,7 @@ React will display `` in the `root`, and take over managing the DOM insid * If you call `render` on the same root more than once, React will update the DOM as necessary to reflect the latest JSX you passed. React will decide which parts of the DOM can be reused and which need to be recreated by ["matching it up"](/learn/preserving-and-resetting-state) with the previously rendered tree. Calling `render` on the same root again is similar to calling the [`set` function](/reference/react/useState#setstate) on the root component: React avoids unnecessary DOM updates. -* Although rendering is synchronous once it starts, `root.render(...)` is not. This means code after `root.render()` may run before any effects (`useLayoutEffect`, `useEffect`) of that specific render are fired. This is usually fine and rarely needs adjustment. In rare cases where effect timing matters, you can wrap `root.render(...)` in [`flushSync`](https://react.dev/reference/react-dom/client/flushSync) to ensure the initial render runs fully synchronously. +* Although rendering is synchronous once it starts, `root.render(...)` is not. This means code after `root.render()` may run before any effects (`useLayoutEffect`, `useEffect`) of that specific render are fired. This is usually fine and rarely needs adjustment. In rare cases where effect timing matters, you can wrap `root.render(...)` in [`flushSync`](https://react.dev/reference/react-dom/flushSync) to ensure the initial render runs fully synchronously. ```js const root = createRoot(document.getElementById('root')); From 391ef36206c2830210655e3cea2caefb5378ad52 Mon Sep 17 00:00:00 2001 From: Ohjoo Date: Thu, 10 Jul 2025 16:02:52 +0900 Subject: [PATCH 021/368] docs: fix markdown italics not rendering in you-might-not-need-an-effect.md (#1235) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 마크다운 강조 표기(_text_)가 제대로 렌더링되지 않는 문제를 수정했습니다. (#1234) # 아시아권 문자에서 발생하는 강조 표기가 렌더링되지 않는 현상이 발생했습니다. 그로 인해 _ _ 문자가 그대로 나타난 것을 다른 이슈를 참고 (#1213) 후 태그를 활용하여 수정했습니다. ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --- src/content/learn/you-might-not-need-an-effect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/you-might-not-need-an-effect.md b/src/content/learn/you-might-not-need-an-effect.md index 28d2fcd09..7c1e57132 100644 --- a/src/content/learn/you-might-not-need-an-effect.md +++ b/src/content/learn/you-might-not-need-an-effect.md @@ -358,7 +358,7 @@ function Form() { } ``` -어떤 로직을 이벤트 핸들러에 넣을지 Effect에 넣을지 선택할 때 사용자 관점에서 _어떤 종류의 로직인지_에 대한 답을 찾아야 합니다. 이 로직이 특정 상호작용으로 인해 발생하는 것이라면 이벤트 핸들러에 두세요. 사용자가 화면에서 컴포넌트를 _보는 것_이 원인이라면 Effect에 두세요. +어떤 로직을 이벤트 핸들러에 넣을지 Effect에 넣을지 선택할 때 사용자 관점에서 어떤 종류의 로직인지에 대한 답을 찾아야 합니다. 이 로직이 특정 상호작용으로 인해 발생하는 것이라면 이벤트 핸들러에 두세요. 사용자가 화면에서 컴포넌트를 보는 것이 원인이라면 Effect에 두세요. ### 연쇄 계산 {/*chains-of-computations*/} From 9467f6a608a99a5b61e75a37dd6084094f7844ed Mon Sep 17 00:00:00 2001 From: Kim Min-gyu <99083803+cobocho@users.noreply.github.com> Date: Thu, 10 Jul 2025 16:09:19 +0900 Subject: [PATCH 022/368] docs: add Korean translation for API page (#1233) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # `` API 한국어 번역 [Activity API](https://ko.react.dev/reference/react/Activity)의 콘텐츠를 한국어로 번역했습니다. close #1229 ## 필수 확인 사항 - [x] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성Draft Translation - [ ] 리뷰 반영Resolve Reviews --------- Co-authored-by: 루밀LuMir --- src/content/reference/react/Activity.md | 126 ++++++++++++------------ 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/src/content/reference/react/Activity.md b/src/content/reference/react/Activity.md index 01328a2a0..a0763e230 100644 --- a/src/content/reference/react/Activity.md +++ b/src/content/reference/react/Activity.md @@ -5,21 +5,21 @@ version: experimental -**This API is experimental and is not available in a stable version of React yet.** +**이 API는 실험적이며 아직 React의 안정 버전에서 사용할 수 없습니다.** -You can try it by upgrading React packages to the most recent experimental version: +React 패키지를 최신 실험적 버전으로 업그레이드하여 시도해 볼 수 있습니다. - `react@experimental` - `react-dom@experimental` - `eslint-plugin-react-hooks@experimental` -Experimental versions of React may contain bugs. Don't use them in production. +React의 실험적 버전에는 버그가 포함될 수 있습니다. 프로덕션 환경에서는 사용하지 마세요. -`` lets you hide and show part of the UI. +``를 사용하면 UI 일부를 숨기거나 보여줄 수 있습니다. ```js @@ -34,11 +34,11 @@ Experimental versions of React may contain bugs. Don't use them in production. --- -## Reference {/*reference*/} +## 레퍼런스 {/*reference*/} ### `` {/*activity*/} -Wrap a part of the UI in `` to manage its visibility state: +UI 일부를 ``로 감싸서 표시 상태를 관리할 수 있습니다. ```js import {unstable_Activity as Activity} from 'react'; @@ -48,30 +48,30 @@ import {unstable_Activity as Activity} from 'react'; ``` -When "hidden", the `children` of `` are not visible on the page. If a new `` mounts as "hidden" then it pre-renders the content at lower priority without blocking the visible content on the page, but it does not mount by creating Effects. When a "visible" Activity switches to "hidden" it conceptually unmounts by destroying all the Effects, but saves its state. This allows fast switching between "visible" and "hidden" states without recreating the state for a "hidden" Activity. +"hidden" 상태일 때 ``의 `children`은 페이지에 표시되지 않습니다. 새로운 ``가 "hidden" 상태로 마운트되면 페이지의 표시되는 콘텐츠를 차단하지 않으면서 낮은 우선순위로 콘텐츠를 사전 렌더링하지만, Effect를 생성하여 마운트하지는 않습니다. "visible" Activity가 "hidden"으로 전환되면 모든 Effect를 제거하여 개념적으로는 마운트 해제되지만, 상태는 저장됩니다. 이를 통해 "hidden" Activity의 상태를 재생성하지 않고도 "visible"과 "hidden" 상태 간의 빠른 전환이 가능합니다. -In the future, "hidden" Activities may automatically destroy state based on resources like memory. +앞으로는 메모리 등 리소스 상황에 따라, "hidden" Activity의 상태가 자동으로 제거될 수 있습니다. #### Props {/*props*/} -* `children`: The actual UI you intend to render. -* **optional** `mode`: Either "visible" or "hidden". Defaults to "visible". When "hidden", updates to the children are deferred to lower priority. The component will not create Effects until the Activity is switched to "visible". If a "visible" Activity switches to "hidden", the Effects will be destroyed. +* `children`: 실제로 렌더링하려는 UI입니다. +* **optional** `mode`: "visible" 또는 "hidden" 중 하나입니다. 기본값은 "visible"입니다. "hidden"일 때는 자식 컴포넌트의 업데이트가 낮은 우선순위로 지연됩니다. 컴포넌트는 Activity가 "visible"로 전환할 때까지 Effect를 생성하지 않습니다. "visible" Activity가 "hidden"으로 전환되면 Effect가 제거됩니다. -#### Caveats {/*caveats*/} +#### 주의 사항 {/*caveats*/} -- While hidden, the `children` of `` are hidden on the page. -- `` will unmount all Effects when switching from "visible" to "hidden" without destroying React or DOM state. This means Effects that are expected to run only once on mount will run again when switching from "hidden" to "visible". Conceptually, "hidden" Activities are unmounted, but they are not destroyed either. We recommend using [``](/reference/react/StrictMode) to catch any unexpected side-effects from this behavior. -- When used with ``, hidden activities that reveal in a transition will activate an "enter" animation. Visible Activities hidden in a transition will activate an "exit" animation. -- Parts of the UI wrapped in `` are not included in the SSR response. -- Parts of the UI wrapped in `` will hydrate at a lower priority than other content. +- 숨겨진 상태에서 ``의 `children`은 페이지에 숨겨집니다. +- ``는 "visible"에서 "hidden"으로 전환할 때 React나 DOM 상태를 제거하지 않고 모든 Effect를 마운트 해제합니다. 이는 마운트 시 한 번만 실행될 것으로 예상되는 Effect가 "hidden"에서 "visible"로 전환할 때 다시 실행됨을 의미합니다. 개념적으로는 "hidden" Activity는 마운트 해제되지만, 제거되지는 않습니다. 이러한 동작으로 인한 예상치 못한 부작용을 잡기 위해 [``](/reference/react/StrictMode)를 사용하는 것을 추천합니다. +- ``과 함께 사용할 때 전환에서 나타나는 숨겨진 Activity는 "enter" 애니메이션을 활성화합니다. 전환에서 숨겨지는 표시되는 Activity는 "exit" 애니메이션을 활성화합니다. +- ``으로 감싸진 UI 부분은 SSR 응답에 포함되지 않습니다. +- ``으로 감싸진 UI 부분은 다른 콘텐츠보다 낮은 우선순위로 하이드레이션됩니다. --- -## Usage {/*usage*/} +## 사용법 {/*usage*/} -### Pre-render part of the UI {/*pre-render-part-of-the-ui*/} +### UI 일부 사전 렌더링하기 {/*pre-render-part-of-the-ui*/} -You can pre-render part of the UI using ``: +``을 사용하여 UI 일부를 사전 렌더링할 수 있습니다. ```js @@ -79,11 +79,11 @@ You can pre-render part of the UI using ``: ``` -When an Activity is rendered with `mode="hidden"`, the `children` are not visible on the page, but are rendered at lower priority than the visible content on the page. +Activity가 `mode="hidden"`으로 렌더링되면 `children`은 페이지에 표시되지 않지만, 페이지의 표시되는 콘텐츠보다 낮은 우선순위로 렌더링됩니다. -When the `mode` later switches to "visible", the pre-rendered children will mount and become visible. This can be used to prepare parts of the UI the user is likely to interact with next to reduce loading times. +나중에 `mode`가 "visible"로 전환되면 사전 렌더링 된 자식 컴포넌트가 마운트되고 표시됩니다. 이를 통해 사용자가 다음에 상호작용을 할 가능성이 높은 UI 부분을 미리 준비하여 로딩 시간을 줄일 수 있습니다. -In the following example from [`useTransition`](/reference/react/useTransition#preventing-unwanted-loading-indicators), the `PostsTab` component fetches some data using `use`. When you click the "Posts" tab, the `PostsTab` component suspends, causing the button loading state to appear: +다음은 [`useTransition`](/reference/react/useTransition#preventing-unwanted-loading-indicators)에서 가져온 예시입니다. `PostsTab` 컴포넌트는 `use`를 사용하여 일부 데이터를 가져옵니다. "Posts" 탭을 클릭하면 `PostsTab` 컴포넌트가 일시 중단되어 버튼 로딩 상태가 나타납니다. @@ -213,9 +213,9 @@ export default function ContactTab() { ```js src/data.js hidden -// Note: the way you would do data fetching depends on -// the framework that you use together with Suspense. -// Normally, the caching logic would be inside a framework. +// Note: 데이터 페칭 방법은 +// Suspense와 함께 사용하는 프레임워크에 따라 달라집니다. +// 일반적으로 캐싱 로직은 프레임워크 내부에 있습니다. let cache = new Map(); @@ -235,7 +235,7 @@ async function getData(url) { } async function getPosts() { - // Add a fake delay to make waiting noticeable. + // 대기 시간을 눈에 띄게 만들기 위해 가짜 지연을 추가합니다. await new Promise(resolve => { setTimeout(resolve, 1000); }); @@ -276,9 +276,9 @@ b { display: inline-block; margin-right: 10px; } -In this example, the user needs to wait for the posts to load when clicking on the "Posts" tab. +이 예시에서 "Posts" 탭을 클릭할 때 게시물이 로드될 때까지 기다려야 합니다. -We can reduce the delay for the "Posts" tab by pre-rendering the inactive Tabs with a hidden ``: +숨겨진 ``로 비활성 탭을 사전 렌더링하여 "Posts" 탭의 지연 시간을 줄일 수 있습니다. @@ -405,9 +405,9 @@ export default function ContactTab() { ```js src/data.js hidden -// Note: the way you would do data fetching depends on -// the framework that you use together with Suspense. -// Normally, the caching logic would be inside a framework. +// Note: 데이터 페칭 방법은 +// Suspense와 함께 사용하는 프레임워크에 따라 달라집니다. +// 일반적으로 캐싱 로직은 프레임워크 내부에 있습니다. let cache = new Map(); @@ -427,7 +427,7 @@ async function getData(url) { } async function getPosts() { - // Add a fake delay to make waiting noticeable. + // 대기 시간을 눈에 띄게 만들기 위해 가짜 지연을 추가합니다. await new Promise(resolve => { setTimeout(resolve, 1000); }); @@ -470,10 +470,10 @@ b { display: inline-block; margin-right: 10px; } --- -### Keeping state for part of the UI {/*keeping-state-for-part-of-the-ui*/} +### UI 일부의 상태 유지하기 {/*keeping-state-for-part-of-the-ui*/} -You can keep state for parts of the UI by switching `` from "visible" to "hidden": +``를 "visible"에서 "hidden"으로 전환하여 UI 일부의 상태를 유지할 수 있습니다. ```js @@ -481,11 +481,11 @@ You can keep state for parts of the UI by switching `` from "visible" ``` -When an Activity switches from `mode="visible"` to "hidden", the `children` will become hidden on the page, and unmount by destroying all Effects, but will keep their React and DOM state. +Activity가 `mode="visible"`에서 "hidden"으로 전환되면 `children`은 페이지에서 숨겨지고 모든 Effect를 제거하여 마운트 해제되지만, React와 DOM 상태는 유지됩니다. -When the `mode` later switches to "visible", the saved state will be re-used when mounting the children by creating all the Effects. This can be used to keep state in parts of the UI the user is likely to interact with again to maintain DOM or React state. +나중에 `mode`가 "visible"로 전환되면 저장된 상태가 모든 Effect를 생성하여 자식 컴포넌트를 마운트할 때 재사용됩니다. 이를 통해 사용자가 다시 상호작용할 가능성이 높은 UI 부분의 상태를 유지하여 DOM이나 React 상태를 유지할 수 있습니다. -In the following example from [`useTransition`](/reference/react/useTransition#preventing-unwanted-loading-indicators), the `ContactTab` includes a `