Skip to content

Commit 7a88505

Browse files
authored
docs: translate remaining React Compiler sections (#1450)
#1449 에 이어 React Compiler 관련 섹션 번역을 모두 완료하였습니다. 2번 이상의 검수를 거쳤기에, 바로 머지합니다.
1 parent b814ddb commit 7a88505

File tree

11 files changed

+139
-139
lines changed

11 files changed

+139
-139
lines changed

src/content/learn/react-compiler/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ React 컴파일러는 [React의 규칙](/reference/rules)을 따르는 코드를
2020

2121
### 컴파일러 오류 vs 런타임 문제 {/*compiler-errors-vs-runtime-issues*/}
2222

23-
**컴파일러 오류**는 빌드 시점에 발생하며 코드가 컴파일되지 않게 합니다. 컴파일러는 문제가 있는 코드를 실패시키기보다 건너뛰도록 설계되어 있기 때문에 이러한 오류는 드뭅니다.
23+
**컴파일러 오류**는 빌드 시점에 발생하며 코드가 컴파일되지 않게 합니다. 컴파일러는 문제가 있는 코드를 실패시키기보다 건너뛰도록 설계되어 있기 때문에 이러한 오류는 자주 발생하지 않습니다.
2424

2525
**런타임 문제**는 컴파일된 코드가 예상과 다르게 동작할 때 발생합니다. React 컴파일러 관련 문제가 발생하면 대부분 런타임 문제입니다. 이는 일반적으로 컴파일러가 감지할 수 없는 미묘한 방식으로 코드가 React의 규칙을 위반하고, 컴파일러가 건너뛰어야 했던 컴포넌트를 실수로 컴파일했을 때 발생합니다.
2626

src/content/learn/react-compiler/incremental-adoption.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: 점진적 도입
33
---
44

55
<Intro>
6-
React 컴파일러는 점진적으로 도입할 수 있어서 코드베이스의 특정 부분에서 먼저 시도해 볼 수 있습니다. 이 가이드에서는 기존 프로젝트에서 컴파일러를 단계적으로 배포하는 방법을 알아봅니다.
6+
React 컴파일러는 점진적으로 도입할 수 있으며, 코드베이스의 특정 부분에서 먼저 시도해 볼 수 있습니다. 이 가이드에서는 기존 프로젝트에서 컴파일러를 단계적으로 배포하는 방법을 알아봅니다.
77
</Intro>
88

99
<YouWillLearn>
1010

1111
* 점진적 도입이 권장되는 이유
1212
* 디렉터리 기반 도입을 위한 Babel overrides 사용
13-
* 선택적 컴파일을 위한 "use memo" 지시어 사용
14-
* 컴포넌트 제외를 위한 "use no memo" 지시어 사용
13+
* 선택적 컴파일을 위한 `"use memo"` 지시어 사용
14+
* 컴포넌트 제외를 위한 `"use no memo"` 지시어 사용
1515
* 게이팅을 통한 런타임 기능 플래그
1616
* 도입 진행 상황 모니터링
1717

@@ -32,7 +32,7 @@ React 컴파일러는 전체 코드베이스를 자동으로 최적화하도록
3232
React 컴파일러를 점진적으로 도입하는 세 가지 주요 방법이 있습니다.
3333

3434
1. **Babel overrides** - 특정 디렉터리에 컴파일러 적용
35-
2. **"use memo"로 선택적 적용** - 명시적으로 선택한 컴포넌트만 컴파일
35+
2. **`"use memo"`로 선택적 적용** - 명시적으로 선택한 컴포넌트만 컴파일
3636
3. **런타임 게이팅** - 기능 플래그로 컴파일 제어
3737

3838
모든 방법은 전체 배포 전에 애플리케이션의 특정 부분에서 컴파일러를 테스트할 수 있게 해줍니다.
@@ -119,9 +119,9 @@ module.exports = {
119119
```
120120

121121

122-
## "use memo"를 사용한 선택적 모드 {/*opt-in-mode-with-use-memo*/}
122+
## `"use memo"`를 사용한 선택적 모드 {/*opt-in-mode-with-use-memo*/}
123123

124-
최대한의 제어를 위해 `compilationMode: 'annotation'`을 사용하여 `"use memo"` 지시어로 명시적으로 선택한 컴포넌트와 Hook만 컴파일할 수 있습니다.
124+
최대한의 제어를 위해 `compilationMode: 'annotation'`을 사용하여 `"use memo"` 지시어를 통해 명시적으로 선택한 컴포넌트와 Hook만 컴파일할 수 있습니다.
125125

126126
<Note>
127127
이 방법은 개별 컴포넌트와 Hook에 대한 세밀한 제어를 제공합니다. 전체 디렉터리에 영향을 주지 않고 특정 컴포넌트에서 컴파일러를 테스트하고 싶을 때 유용합니다.
@@ -167,9 +167,9 @@ function useSortedData(data) {
167167
```
168168

169169
`compilationMode: 'annotation'`을 사용하면 다음을 해야 합니다.
170-
- 최적화하려는 모든 컴포넌트에 `"use memo"` 추가
171-
- 모든 커스텀 Hook에 `"use memo"` 추가
172-
- 컴포넌트에도 추가하는 것을 기억
170+
- 최적화하려는 모든 컴포넌트에 `"use memo"`를 추가합니다.
171+
- 모든 커스텀 Hook에 `"use memo"`를 추가합니다.
172+
- 이후에 새로 작성하는 컴포넌트에도 추가하는 것을 잊지 마세요.
173173

174174
이를 통해 컴파일러의 영향을 평가하는 동안 어떤 컴포넌트가 컴파일되는지 정밀하게 제어할 수 있습니다.
175175

src/content/learn/react-compiler/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: React 컴파일러
88

99
## 설치 {/*installation*/}
1010

11-
[React 컴파일러 설치](/learn/react-compiler/installation)를 시작하고 빌드 도구와 함께 구성하는 방법을 알아보세요.
11+
[React 컴파일러 설치](/learn/react-compiler/installation)통해 시작하고 빌드 도구와 함께 구성하는 방법을 알아보세요.
1212

1313

1414
## 점진적 도입 {/*incremental-adoption*/}

src/content/learn/react-compiler/installation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,15 @@ ESLint 규칙은 다음과 같은 역할을 합니다.
187187

188188
React 컴파일러에 의해 최적화된 컴포넌트는 React DevTools에서 "Memo ✨" 배지가 표시됩니다.
189189

190-
1. [React Developer Tools](/learn/react-developer-tools) 브라우저 확장 프로그램을 설치합니다
191-
2. 개발 모드에서 앱을 엽니다
192-
3. React DevTools를 엽니다
193-
4. 컴포넌트 이름 옆에 ✨ 이모지가 있는지 확인합니다
190+
1. [React Developer Tools](/learn/react-developer-tools) 브라우저 확장 프로그램을 설치합니다.
191+
2. 개발 모드에서 앱을 엽니다.
192+
3. React DevTools를 엽니다.
193+
4. 컴포넌트 이름 옆에 ✨ 이모지가 있는지 확인합니다.
194194

195195
컴파일러가 작동하는 경우
196-
- 컴포넌트에 "Memo ✨" 배지가 React DevTools에 표시됩니다
197-
- 비용이 큰 계산이 자동으로 메모이제이션됩니다
198-
- 수동으로 `useMemo`를 사용할 필요가 없습니다
196+
- 컴포넌트에 "Memo ✨" 배지가 React DevTools에 표시됩니다.
197+
- 비용이 큰 계산이 자동으로 메모이제이션됩니다.
198+
- 수동으로 `useMemo`를 사용할 필요가 없습니다.
199199

200200
### 빌드 출력 확인 {/*check-build-output*/}
201201

src/content/learn/react-compiler/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ React 컴파일러의 자동 메모이제이션은 주로 **업데이트 성능
9999

100100
#### 리렌더링 최적화 {/*optimizing-re-renders*/}
101101

102-
React는 UI를 현재 state의 함수로 표현할 수 있게 해줍니다 (더 구체적으로는 props, state, context). 현재 구현에서 컴포넌트의 state가 변경되면 React는 `useMemo()`, `useCallback()`, `React.memo()`를 사용한 수동 메모이제이션을 적용하지 않는 한 해당 컴포넌트 _ 모든 자식 컴포넌트_를 리렌더링합니다. 예를 들어, 다음 예시에서 `<MessageButton>``<FriendList>`의 state가 변경될 때마다 리렌더링됩니다.
102+
React는 UI를 현재 state의 함수로 표현할 수 있게 해줍니다 (더 구체적으로는 props, state, context). 현재 구현에서 컴포넌트의 state가 변경되면 React는 `useMemo()`, `useCallback()`, `React.memo()`를 사용한 수동 메모이제이션을 적용하지 않는 한 해당 컴포넌트 <em>및 모든 자식 컴포넌트</em>를 리렌더링합니다. 예를 들어, 다음 예시에서 `<MessageButton>``<FriendList>`의 state가 변경될 때마다 리렌더링됩니다.
103103

104104
```javascript
105105
function FriendList({ friends }) {
@@ -144,7 +144,7 @@ function TableContainer({ items }) {
144144
- React 컴파일러는 모든 함수가 아닌 React 컴포넌트와 Hook만 메모이제이션합니다.
145145
- React 컴파일러의 메모이제이션은 여러 컴포넌트나 Hook 간에 공유되지 않습니다.
146146

147-
따라서 `expensivelyProcessAReallyLargeArrayOfObjects`가 여러 다른 컴포넌트에서 사용되는 경우, 정확히 동일한 items가 전달되더라도 비용이 많이 드는 계산이 반복적으로 실행됩니다. 코드를 더 복잡하게 만들기 전에 먼저 [프로파일링](reference/react/useMemo#how-to-tell-if-a-calculation-is-expensive)하여 정말로 비용이 많이 드는지 확인하는 것을 권장합니다.
147+
따라서 `expensivelyProcessAReallyLargeArrayOfObjects`가 여러 다른 컴포넌트에서 사용되는 경우, 정확히 동일한 `items` 전달되더라도 비용이 많이 드는 계산이 반복적으로 실행됩니다. 코드를 더 복잡하게 만들기 전에 먼저 [프로파일링](reference/react/useMemo#how-to-tell-if-a-calculation-is-expensive)하여 정말로 비용이 많이 드는지 확인하는 것을 권장합니다.
148148
</DeepDive>
149149

150150
## 컴파일러를 사용해 봐야 하나요? {/*should-i-try-out-the-compiler*/}
Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
2-
title: Compiling Libraries
2+
title: 라이브러리 컴파일
33
---
44

55
<Intro>
6-
This guide helps library authors understand how to use React Compiler to ship optimized library code to their users.
6+
이 가이드는 라이브러리 작성자가 React 컴파일러를 사용하여 최적화된 라이브러리 코드를 사용자에게 제공하는 방법을 설명합니다.
77
</Intro>
88

99
<InlineToc />
1010

11-
## Why Ship Compiled Code? {/*why-ship-compiled-code*/}
11+
## 컴파일된 코드를 배포해야 하는 이유 {/*why-ship-compiled-code*/}
1212

13-
As a library author, you can compile your library code before publishing to npm. This provides several benefits:
13+
라이브러리 작성자는 npm에 배포하기 전에 라이브러리 코드를 컴파일할 수 있습니다. 이는 여러 가지 이점을 제공합니다.
1414

15-
- **Performance improvements for all users** - Your library users get optimized code even if they aren't using React Compiler yet
16-
- **No configuration required by users** - The optimizations work out of the box
17-
- **Consistent behavior** - All users get the same optimized version regardless of their build setup
15+
- **모든 사용자를 위한 성능 향상** - 라이브러리 사용자가 아직 React 컴파일러를 사용하지 않더라도 최적화된 코드를 얻습니다.
16+
- **사용자에게 설정이 필요 없음** - 최적화가 바로 작동합니다.
17+
- **일관된 동작** - 모든 사용자가 빌드 설정에 관계없이 동일한 최적화된 버전을 얻습니다.
1818

19-
## Setting Up Compilation {/*setting-up-compilation*/}
19+
## 컴파일 설정하기 {/*setting-up-compilation*/}
2020

21-
Add React Compiler to your library's build process:
21+
라이브러리의 빌드 프로세스에 React 컴파일러를 추가하세요.
2222

2323
<TerminalBlock>
2424
npm install -D babel-plugin-react-compiler@latest
2525
</TerminalBlock>
2626

27-
Configure your build tool to compile your library. For example, with Babel:
27+
라이브러리를 컴파일하도록 빌드 도구를 설정하세요. Babel을 사용하는 예시입니다.
2828

2929
```js
3030
// babel.config.js
@@ -36,13 +36,13 @@ module.exports = {
3636
};
3737
```
3838

39-
## Backwards Compatibility {/*backwards-compatibility*/}
39+
## 하위 호환성 {/*backwards-compatibility*/}
4040

41-
If your library supports React versions below 19, you'll need additional configuration:
41+
라이브러리가 React 19 미만 버전을 지원하는 경우 추가 설정이 필요합니다.
4242

43-
### 1. Install the runtime package {/*install-runtime-package*/}
43+
### 1. 런타임 패키지 설치하기 {/*install-runtime-package*/}
4444

45-
We recommend installing react-compiler-runtime as a direct dependency:
45+
`react-compiler-runtime`을 직접 의존성<sup>`dependencies`</sup>으로 설치하는 것을 권장합니다.
4646

4747
<TerminalBlock>
4848
npm install react-compiler-runtime@latest
@@ -59,48 +59,48 @@ npm install react-compiler-runtime@latest
5959
}
6060
```
6161

62-
### 2. Configure the target version {/*configure-target-version*/}
62+
### 2. `target` 버전 설정하기 {/*configure-target-version*/}
6363

64-
Set the minimum React version your library supports:
64+
라이브러리가 지원하는 최소 React 버전을 설정하세요.
6565

6666
```js
6767
{
68-
target: '17', // Minimum supported React version
68+
target: '17', // 지원하는 최소 React 버전
6969
}
7070
```
7171

72-
## Testing Strategy {/*testing-strategy*/}
72+
## 테스트 전략 {/*testing-strategy*/}
7373

74-
Test your library both with and without compilation to ensure compatibility. Run your existing test suite against the compiled code, and also create a separate test configuration that bypasses the compiler. This helps catch any issues that might arise from the compilation process and ensures your library works correctly in all scenarios.
74+
호환성을 보장하기 위해 컴파일 유무에 관계없이 라이브러리를 테스트하세요. 컴파일된 코드에 대해 기존 테스트를 실행하고 컴파일러를 우회하는 별도의 테스트 설정도 만드세요. 이렇게 하면 컴파일 과정에서 발생할 수 있는 문제를 발견하고 모든 시나리오에서 라이브러리가 올바르게 작동하는지 확인할 수 있습니다.
7575

76-
## Troubleshooting {/*troubleshooting*/}
76+
## 문제 해결 {/*troubleshooting*/}
7777

78-
### Library doesn't work with older React versions {/*library-doesnt-work-with-older-react-versions*/}
78+
### 라이브러리가 이전 React 버전에서 작동하지 않는 경우 {/*library-doesnt-work-with-older-react-versions*/}
7979

80-
If your compiled library throws errors in React 17 or 18:
80+
컴파일된 라이브러리가 React 17 또는 18에서 오류를 발생시키는 경우입니다.
8181

82-
1. Verify you've installed `react-compiler-runtime` as a dependency
83-
2. Check that your `target` configuration matches your minimum supported React version
84-
3. Ensure the runtime package is included in your published bundle
82+
1. `react-compiler-runtime`이 의존성으로 설치되어 있는지 확인하세요.
83+
2. `target` 설정이 지원하는 최소 React 버전과 일치하는지 확인하세요.
84+
3. 런타임 패키지가 배포된 번들에 포함되어 있는지 확인하세요.
8585

86-
### Compilation conflicts with other Babel plugins {/*compilation-conflicts-with-other-babel-plugins*/}
86+
### 다른 Babel 플러그인과의 컴파일 충돌 {/*compilation-conflicts-with-other-babel-plugins*/}
8787

88-
Some Babel plugins may conflict with React Compiler:
88+
일부 Babel 플러그인은 React 컴파일러와 충돌할 수 있습니다.
8989

90-
1. Place `babel-plugin-react-compiler` early in your plugin list
91-
2. Disable conflicting optimizations in other plugins
92-
3. Test your build output thoroughly
90+
1. `babel-plugin-react-compiler`를 플러그인 목록의 앞쪽에 배치하세요.
91+
2. 다른 플러그인에서 충돌하는 최적화를 비활성화하세요.
92+
3. 빌드 출력을 철저히 테스트하세요.
9393

94-
### Runtime module not found {/*runtime-module-not-found*/}
94+
### 런타임 모듈을 찾을 수 없는 경우 {/*runtime-module-not-found*/}
9595

96-
If users see "Cannot find module 'react-compiler-runtime'":
96+
사용자가 "Cannot find module 'react-compiler-runtime'" 오류를 보는 경우입니다.
9797

98-
1. Ensure the runtime is listed in `dependencies`, not `devDependencies`
99-
2. Check that your bundler includes the runtime in the output
100-
3. Verify the package is published to npm with your library
98+
1. 런타임이 `devDependencies`가 아닌 `dependencies`에 나열되어 있는지 확인하세요.
99+
2. 번들러가 출력에 런타임을 포함하는지 확인하세요.
100+
3. 패키지가 라이브러리와 함께 npm에 배포되었는지 확인하세요.
101101

102-
## Next Steps {/*next-steps*/}
102+
## 다음 단계 {/*next-steps*/}
103103

104-
- Learn about [debugging techniques](/learn/react-compiler/debugging) for compiled code
105-
- Check the [configuration options](/reference/react-compiler/configuration) for all compiler options
106-
- Explore [compilation modes](/reference/react-compiler/compilationMode) for selective optimization
104+
- 컴파일된 코드를 위한 [디버깅 기법](/learn/react-compiler/debugging)에 대해 알아보세요.
105+
- 모든 컴파일러 옵션을 위한 [설정 옵션](/reference/react-compiler/configuration)을 확인하세요.
106+
- 선택적 최적화를 위한 [컴파일 모드](/reference/react-compiler/compilationMode)를 살펴보세요.

0 commit comments

Comments
 (0)