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*/}
Copy file name to clipboardExpand all lines: src/content/reference/react-compiler/compilationMode.md
+47-47Lines changed: 47 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: compilationMode
4
4
5
5
<Intro>
6
6
7
-
The `compilationMode`option controls how the React Compiler selects which functions to compile.
7
+
`compilationMode`옵션은 React 컴파일러가 어떤 함수를 컴파일할지 선택하는 방식을 제어합니다.
8
8
9
9
</Intro>
10
10
@@ -18,95 +18,95 @@ The `compilationMode` option controls how the React Compiler selects which funct
18
18
19
19
---
20
20
21
-
## Reference {/*reference*/}
21
+
## 레퍼런스 {/*reference*/}
22
22
23
23
### `compilationMode` {/*compilationmode*/}
24
24
25
-
Controls the strategy for determining which functions the React Compiler will optimize.
25
+
React 컴파일러가 최적화할 함수를 결정하는 전략을 제어합니다.
26
26
27
-
#### Type {/*type*/}
27
+
#### 타입 {/*type*/}
28
28
29
29
```
30
30
'infer' | 'syntax' | 'annotation' | 'all'
31
31
```
32
32
33
-
#### Default value {/*default-value*/}
33
+
#### 기본값 {/*default-value*/}
34
34
35
35
`'infer'`
36
36
37
-
#### Options {/*options*/}
37
+
#### 옵션 {/*options*/}
38
38
39
-
-**`'infer'`** (default): The compiler uses intelligent heuristics to identify React components and hooks:
40
-
-Functions explicitly annotated with `"use memo"`directive
41
-
-Functions that are named like components (PascalCase) or hooks (`use`prefix) AND create JSX and/or call other hooks
39
+
-**`'infer'`** (기본값): 컴파일러가 지능형 휴리스틱을 사용하여 React 컴포넌트와 Hook을 식별합니다.
40
+
-`"use memo"`지시어로 명시적으로 표시된 함수.
41
+
-컴포넌트(PascalCase) 또는 Hook(`use`접두사)처럼 이름이 지어진 함수이면서 JSX를 생성하거나 다른 Hook을 호출하는 함수.
42
42
43
-
-**`'annotation'`**: Only compile functions explicitly marked with the `"use memo"`directive. Ideal for incremental adoption.
43
+
-**`'annotation'`**: `"use memo"`지시어로 명시적으로 표시된 함수만 컴파일합니다. 점진적 도입에 이상적입니다.
44
44
45
-
-**`'syntax'`**: Only compile components and hooks that use Flow's [component](https://flow.org/en/docs/react/component-syntax/)and [hook](https://flow.org/en/docs/react/hook-syntax/)syntax.
45
+
-**`'syntax'`**: Flow의 [Component](https://flow.org/en/docs/react/component-syntax/)및 [Hook](https://flow.org/en/docs/react/hook-syntax/)문법을 사용하는 컴포넌트와 Hook만 컴파일합니다.
46
46
47
-
-**`'all'`**: Compile all top-level functions. Not recommended as it may compile non-React functions.
47
+
-**`'all'`**: 모든 최상위 함수를 컴파일합니다. React가 아닌 함수도 컴파일할 수 있으므로 권장하지 않습니다.
48
48
49
-
#### Caveats {/*caveats*/}
49
+
#### 주의 사항 {/*caveats*/}
50
50
51
-
-The `'infer'`mode requires functions to follow React naming conventions to be detected
52
-
-Using `'all'`mode may negatively impact performance by compiling utility functions
53
-
-The `'syntax'`mode requires Flow and won't work with TypeScript
54
-
-Regardless of mode, functions with `"use no memo"`directive are always skipped
51
+
-`'infer'`모드는 함수가 React 명명 규칙을 따라야 감지할 수 있습니다.
52
+
-`'all'`모드를 사용하면 유틸리티 함수까지 컴파일하여 성능에 부정적인 영향을 미칠 수 있습니다.
0 commit comments