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/reference/eslint-plugin-react-hooks/lints/gating.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,53 +4,53 @@ title: gating
4
4
5
5
<Intro>
6
6
7
-
Validates configuration of [gating mode](/reference/react-compiler/gating).
7
+
[게이팅 모드](/reference/react-compiler/gating)의 설정을 검증합니다.
8
8
9
9
</Intro>
10
10
11
-
## Rule Details {/*rule-details*/}
11
+
## 규칙 세부 사항 {/*rule-details*/}
12
12
13
-
Gating mode lets you gradually adopt React Compiler by marking specific components for optimization. This rule ensures your gating configuration is valid so the compiler knows which components to process.
13
+
게이팅 모드는 특정 컴포넌트를 최적화 대상으로 표시하여 React 컴파일러를 점진적으로 도입할 수 있게 해줍니다. 이 규칙은 컴파일러가 어떤 컴포넌트를 처리할지 알 수 있도록 게이팅 설정이 유효한지 확인합니다.
14
14
15
-
### Invalid {/*invalid*/}
15
+
### 잘못된 예 {/*invalid*/}
16
16
17
-
Examples of incorrect code for this rule:
17
+
이 규칙에 대한 잘못된 코드 예시입니다.
18
18
19
19
```js
20
-
// ❌ Missing required fields
20
+
// ❌ 필수 필드 누락
21
21
module.exports= {
22
22
plugins: [
23
23
['babel-plugin-react-compiler', {
24
24
gating: {
25
25
importSpecifierName:'__experimental_useCompiler'
26
-
//Missing 'source' field
26
+
// 'source' 필드 누락
27
27
}
28
28
}]
29
29
]
30
30
};
31
31
32
-
// ❌ Invalid gating type
32
+
// ❌ 유효하지 않은 게이팅 타입
33
33
module.exports= {
34
34
plugins: [
35
35
['babel-plugin-react-compiler', {
36
-
gating:'__experimental_useCompiler'//Should be object
36
+
gating:'__experimental_useCompiler'//객체여야 함
37
37
}]
38
38
]
39
39
};
40
40
```
41
41
42
-
### Valid {/*valid*/}
42
+
### 올바른 예 {/*valid*/}
43
43
44
-
Examples of correct code for this rule:
44
+
이 규칙에 대한 올바른 코드 예시입니다.
45
45
46
46
```js
47
-
// ✅ Complete gating configuration
47
+
// ✅ 완전한 게이팅 설정
48
48
module.exports= {
49
49
plugins: [
50
50
['babel-plugin-react-compiler', {
51
51
gating: {
52
-
importSpecifierName:'isCompilerEnabled', //exported function name
53
-
source:'featureFlags'//module name
52
+
importSpecifierName:'isCompilerEnabled', //내보낸 함수 이름
53
+
source:'featureFlags'//모듈 이름
54
54
}
55
55
}]
56
56
]
@@ -61,11 +61,11 @@ export function isCompilerEnabled() {
0 commit comments