Skip to content

Commit 34203a4

Browse files
committed
wip
1 parent f07e53f commit 34203a4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/content/reference/eslint-plugin-react-hooks/lints/component-hook-factories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const RedButton = makeButton('red');
7979
const BlueButton = makeButton('blue');
8080
```
8181

82-
대신 [JSX를 자식으로 전달](/learn/passing-props-to-a-component#passing-jsx-as-children)하세요.
82+
대신 [자식을 JSX로 전달](/learn/passing-props-to-a-component#passing-jsx-as-children)하세요.
8383

8484
```js
8585
// ✅ 더 나은 방법: JSX를 자식으로 전달

src/content/reference/eslint-plugin-react-hooks/lints/error-boundaries.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ title: error-boundaries
44

55
<Intro>
66

7-
자식 컴포넌트의 오류에 대해 try/catch 대신 Error Boundary 사용을 검증합니다.
7+
자식 컴포넌트의 오류에 대해 `try`/`catch` 대신 Error Boundary 사용을 검증합니다.
88

99
</Intro>
1010

1111
## 규칙 세부 사항 {/*rule-details*/}
1212

13-
try/catch 블록은 React의 렌더링 과정에서 발생하는 오류를 잡을 수 없습니다. 렌더링 메서드나 Hook에서 발생한 오류는 컴포넌트 트리를 타고 위로 전파됩니다. 오직 [Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary)만이 이러한 오류를 잡을 수 있습니다.
13+
`try`/`catch` 블록은 React의 렌더링 과정에서 발생하는 오류를 잡을 수 없습니다. 렌더링 메서드나 Hook에서 발생한 오류는 컴포넌트 트리를 타고 위로 전파됩니다. 오직 [Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary)만이 이러한 오류를 잡을 수 있습니다.
1414

1515
### 잘못된 예시 {/*invalid*/}
1616

1717
이 규칙에 대한 잘못된 코드 예시입니다.
1818

1919
```js
20-
// ❌ try/catch는 렌더링 오류를 잡을 수 없음
20+
//`try`/`catch`는 렌더링 오류를 잡을 수 없음
2121
function Parent() {
2222
try {
2323
return <ChildComponent />; // 여기서 오류가 발생하면 catch가 도움이 되지 않음

src/content/reference/eslint-plugin-react-hooks/lints/globals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: globals
44

55
<Intro>
66

7-
렌더링 중 전역 변수의 할당/변이를 검증합니다. 이는 [사이드 이펙트는 렌더링 외부에서 실행되어야 합니다](/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render) 규칙을 보장하는 일부입니다.
7+
렌더링 중 전역 변수의 할당/변이를 검증합니다. 이는 [사이드 이펙트는 렌더링 외부에서 실행되어야 한다는](/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render) 규칙을 보완합니다.
88

99
</Intro>
1010

src/content/reference/eslint-plugin-react-hooks/lints/incompatible-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ React 컴파일러는 React 규칙을 따라 값을 자동으로 메모이제이
4040

4141
예를 들어, 이러한 호환되지 않는 패턴 중 하나는 "내부 가변성"입니다. 내부 가변성은 객체나 함수가 참조는 동일하게 유지되지만 시간이 지남에 따라 변경되는 자체 숨겨진 상태를 유지하는 것을 말합니다. 외부에서는 동일해 보이지만 내용물을 은밀하게 재배치하는 상자라고 생각하면 됩니다. React는 다른 상자를 받았는지만 확인하고 안에 무엇이 들어 있는지는 확인하지 않기 때문에 변경 사항을 알 수 없습니다. 이는 메모이제이션을 깨뜨리는데, React는 값의 일부가 변경된 경우 외부 객체(또는 함수)가 변경되는 것에 의존하기 때문입니다.
4242

43-
React API를 설계할 경험 법칙으로, `useMemo`가 이를 깨뜨릴지 생각해보세요.
43+
React API를 설계할 때의 경험 법칙으로, `useMemo`가 이를 깨뜨릴지 생각해보세요.
4444

4545
```js
4646
function Component() {
@@ -101,7 +101,7 @@ function Component({data}) {
101101

102102
#### MobX {/*mobx*/}
103103

104-
`observer`와 같은 MobX 패턴도 메모이제이션 가정을 깨뜨리지만, 린터는 아직 이를 감지하지 못합니다. MobX에 의존하고 있고 React 컴파일러에서 앱이 작동하지 않는다면 `"use no memo" 지시어` 사용해야 할 수 있습니다.
104+
`observer`와 같은 MobX 패턴도 메모이제이션 가정을 깨뜨리지만, 린터는 아직 이를 감지하지 못합니다. MobX에 의존하고 있고 React 컴파일러에서 앱이 작동하지 않는다면 `"use no memo"` 지시어를 사용해야 할 수 있습니다.
105105

106106
```js
107107
// ❌ MobX `observer`

0 commit comments

Comments
 (0)