You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/learn/react-compiler/debugging.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ React 컴파일러는 [React의 규칙](/reference/rules)을 따르는 코드를
20
20
21
21
### 컴파일러 오류 vs 런타임 문제 {/*compiler-errors-vs-runtime-issues*/}
22
22
23
-
**컴파일러 오류**는 빌드 시점에 발생하며 코드가 컴파일되지 않게 합니다. 컴파일러는 문제가 있는 코드를 실패시키기보다 건너뛰도록 설계되어 있기 때문에 이러한 오류는 드뭅니다.
23
+
**컴파일러 오류**는 빌드 시점에 발생하며 코드가 컴파일되지 않게 합니다. 컴파일러는 문제가 있는 코드를 실패시키기보다 건너뛰도록 설계되어 있기 때문에 이러한 오류는 자주 발생하지 않습니다.
24
24
25
25
**런타임 문제**는 컴파일된 코드가 예상과 다르게 동작할 때 발생합니다. React 컴파일러 관련 문제가 발생하면 대부분 런타임 문제입니다. 이는 일반적으로 컴파일러가 감지할 수 없는 미묘한 방식으로 코드가 React의 규칙을 위반하고, 컴파일러가 건너뛰어야 했던 컴포넌트를 실수로 컴파일했을 때 발생합니다.
Copy file name to clipboardExpand all lines: src/content/learn/react-compiler/introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ React 컴파일러의 자동 메모이제이션은 주로 **업데이트 성능
99
99
100
100
#### 리렌더링 최적화 {/*optimizing-re-renders*/}
101
101
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가 변경될 때마다 리렌더링됩니다.
103
103
104
104
```javascript
105
105
functionFriendList({ friends }) {
@@ -144,7 +144,7 @@ function TableContainer({ items }) {
144
144
- React 컴파일러는 모든 함수가 아닌 React 컴포넌트와 Hook만 메모이제이션합니다.
145
145
- React 컴파일러의 메모이제이션은 여러 컴포넌트나 Hook 간에 공유되지 않습니다.
146
146
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)하여 정말로 비용이 많이 드는지 확인하는 것을 권장합니다.
148
148
</DeepDive>
149
149
150
150
## 컴파일러를 사용해 봐야 하나요? {/*should-i-try-out-the-compiler*/}
### 2. Configure the target version {/*configure-target-version*/}
62
+
### 2. `target` 버전 설정하기 {/*configure-target-version*/}
63
63
64
-
Set the minimum React version your library supports:
64
+
라이브러리가 지원하는 최소 React 버전을 설정하세요.
65
65
66
66
```js
67
67
{
68
-
target:'17', //Minimum supported React version
68
+
target:'17', //지원하는 최소 React 버전
69
69
}
70
70
```
71
71
72
-
## Testing Strategy {/*testing-strategy*/}
72
+
## 테스트 전략 {/*testing-strategy*/}
73
73
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
+
호환성을 보장하기 위해 컴파일 유무에 관계없이 라이브러리를 테스트하세요. 컴파일된 코드에 대해 기존 테스트를 실행하고 컴파일러를 우회하는 별도의 테스트 설정도 만드세요. 이렇게 하면 컴파일 과정에서 발생할 수 있는 문제를 발견하고 모든 시나리오에서 라이브러리가 올바르게 작동하는지 확인할 수 있습니다.
75
75
76
-
## Troubleshooting {/*troubleshooting*/}
76
+
## 문제 해결 {/*troubleshooting*/}
77
77
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*/}
79
79
80
-
If your compiled library throws errors in React 17 or 18:
80
+
컴파일된 라이브러리가 React 17 또는 18에서 오류를 발생시키는 경우입니다.
81
81
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.런타임 패키지가 배포된 번들에 포함되어 있는지 확인하세요.
85
85
86
-
### Compilation conflicts with other Babel plugins {/*compilation-conflicts-with-other-babel-plugins*/}
86
+
### 다른 Babel 플러그인과의 컴파일 충돌 {/*compilation-conflicts-with-other-babel-plugins*/}
87
87
88
-
Some Babel plugins may conflict with React Compiler:
88
+
일부 Babel 플러그인은 React 컴파일러와 충돌할 수 있습니다.
89
89
90
-
1.Place `babel-plugin-react-compiler` early in your plugin list
91
-
2.Disable conflicting optimizations in other plugins
0 commit comments