Skip to content

Commit da8d2fd

Browse files
committed
wip: translate gating.md
1 parent c30e21e commit da8d2fd

File tree

1 file changed

+28
-28
lines changed
  • src/content/reference/react-compiler

1 file changed

+28
-28
lines changed

src/content/reference/react-compiler/gating.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: gating
44

55
<Intro>
66

7-
The `gating` option enables conditional compilation, allowing you to control when optimized code is used at runtime.
7+
`gating` 옵션은 조건부 컴파일을 활성화하여 런타임에 최적화된 코드가 사용되는 시점을 제어할 수 있게 합니다.
88

99
</Intro>
1010

@@ -21,13 +21,13 @@ The `gating` option enables conditional compilation, allowing you to control whe
2121

2222
---
2323

24-
## Reference {/*reference*/}
24+
## 레퍼런스 {/*reference*/}
2525

2626
### `gating` {/*gating*/}
2727

28-
Configures runtime feature flag gating for compiled functions.
28+
컴파일된 함수에 대한 런타임 기능 플래그 Gating을 설정합니다.
2929

30-
#### Type {/*type*/}
30+
#### 타입 {/*type*/}
3131

3232
```
3333
{
@@ -36,28 +36,28 @@ Configures runtime feature flag gating for compiled functions.
3636
} | null
3737
```
3838

39-
#### Default value {/*default-value*/}
39+
#### 기본값 {/*default-value*/}
4040

4141
`null`
4242

43-
#### Properties {/*properties*/}
43+
#### 프로퍼티 {/*properties*/}
4444

45-
- **`source`**: Module path to import the feature flag from
46-
- **`importSpecifierName`**: Name of the exported function to import
45+
- **`source`**: 기능 플래그를 가져올 모듈 경로.
46+
- **`importSpecifierName`**: 가져오고<sup>Import</sup> 싶은 내보낸<sup>Export</sup> 함수의 이름.
4747

48-
#### Caveats {/*caveats*/}
48+
#### 주의 사항 {/*caveats*/}
4949

50-
- The gating function must return a boolean
51-
- Both compiled and original versions increase bundle size
52-
- The import is added to every file with compiled functions
50+
- Gating 함수는 반드시 boolean을 반환해야 합니다.
51+
- 컴파일된 버전과 원본 버전 모두 번들 크기를 증가시킵니다.
52+
- `import`는 컴파일된 함수가 있는 모든 파일에 추가됩니다.
5353

5454
---
5555

56-
## Usage {/*usage*/}
56+
## 사용법 {/*usage*/}
5757

58-
### Basic feature flag setup {/*basic-setup*/}
58+
### 기본 기능 플래그 설정 {/*basic-setup*/}
5959

60-
1. Create a feature flag module:
60+
1. 기능 플래그 모듈을 생성합니다.
6161

6262
```js
6363
// src/utils/feature-flags.js
@@ -67,7 +67,7 @@ export function shouldUseCompiler() {
6767
}
6868
```
6969

70-
2. Configure the compiler:
70+
2. 컴파일러를 설정합니다.
7171

7272
```js
7373
{
@@ -78,7 +78,7 @@ export function shouldUseCompiler() {
7878
}
7979
```
8080

81-
3. The compiler generates gated code:
81+
3. 컴파일러가 게이트된 코드를 생성합니다.
8282

8383
```js
8484
// Input
@@ -94,46 +94,46 @@ const Button = shouldUseCompiler()
9494
: function Button_original(props) { /* original version */ };
9595
```
9696

97-
Note that the gating function is evaluated once at module time, so once the JS bundle has been parsed and evaluated the choice of component stays static for the rest of the browser session.
97+
Gating 함수는 모듈 시간에 한 번만 평가되므로, JS 번들이 파싱되고 평가된 후에는 선택된 컴포넌트가 브라우저 세션이 끝날 때까지 정적으로 유지됩니다.
9898

9999
---
100100

101-
## Troubleshooting {/*troubleshooting*/}
101+
## 문제 해결 {/*troubleshooting*/}
102102

103-
### Feature flag not working {/*flag-not-working*/}
103+
### 기능 플래그가 작동하지 않는 경우 {/*flag-not-working*/}
104104

105-
Verify your flag module exports the correct function:
105+
플래그 모듈이 올바른 함수를 내보내는지 확인하세요.
106106

107107
```js
108-
//Wrong: Default export
108+
//잘못된 예: Default export
109109
export default function shouldUseCompiler() {
110110
return true;
111111
}
112112

113-
//Correct: Named export matching importSpecifierName
113+
//올바른 예: importSpecifierName과 일치하는 Named export
114114
export function shouldUseCompiler() {
115115
return true;
116116
}
117117
```
118118

119-
### Import errors {/*import-errors*/}
119+
### Import 오류 {/*import-errors*/}
120120

121-
Ensure the source path is correct:
121+
`source`의 경로가 올바른지 확인하세요.
122122

123123
```js
124-
//Wrong: Relative to babel.config.js
124+
//잘못된 예: `babel.config.js`에 상대적인 경로
125125
{
126126
source: './src/flags',
127127
importSpecifierName: 'flag'
128128
}
129129

130-
//Correct: Module resolution path
130+
//올바른 예: 모듈 해석 경로
131131
{
132132
source: '@myapp/feature-flags',
133133
importSpecifierName: 'flag'
134134
}
135135

136-
//Also correct: Absolute path from project root
136+
//올바른 예: 프로젝트 루트로부터의 절대 경로
137137
{
138138
source: './src/utils/flags',
139139
importSpecifierName: 'flag'

0 commit comments

Comments
 (0)