Skip to content

Commit f4aa68e

Browse files
authored
docs: translate error boundary notes in Component reference (#1555)
<!-- PR을 보내주셔서 감사합니다! 여러분과 같은 기여자들이 React를 더욱 멋지게 만듭니다! 기존 이슈와 관련된 PR이라면, 아래에 이슈 번호를 추가해주세요. --> ## `Component.md` 누락된 문장 추가 번역 <img width="946" height="741" alt="image" src="https://github.com/user-attachments/assets/e4d196f0-a194-46dd-b15d-6e411f5079bd" /> - 웹에서 확인하기 ([링크](https://ko.react.dev/reference/react/Component)) 안녕하세요. 문서를 정독하던 중 `src/content/reference/react/Component.md`에 누락된 번역 문장을 발견하여 수정했습니다. 판단이 필요한 지점은 아래의 필수 확인 사항과 같은 폴더 내 다른 문서들을 참고했습니다. 틀리다고 생각하시는 부분이 있다면 코멘트를 남겨주세요. 감사합니다. - ... do not catch ...: 포착하지 못합니다. - Event handlers: 이벤트 핸들러 - you can include: 포함할 수 있습니다. (당신/여러분 생략) - rather than its children: 자식이 아닌 ## 필수 확인 사항 - [x] [기여자 행동 강령 규약<sup>Code of Conduct</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인<sup>Contributing</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드<sup>Universal Style Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례<sup>Best Practices for Translation</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리<sup>Translate Glossary</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드<sup>Textlint Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사<sup>Spelling Check</sup>](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성<sup>Draft Translation</sup> - [ ] 리뷰 반영<sup>Resolve Reviews</sup>
1 parent 1b1b6a4 commit f4aa68e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/content/reference/react/Component.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,18 +1272,18 @@ button { margin-left: 10px; }
12721272
기본적으로 애플리케이션이 렌더링 도중 에러를 발생시키면 React는 화면에서 해당 UI를 제거합니다. 이를 방지하기 위해 UI의 일부를 *Error Boundary*로 감싸면 됩니다. Error Boundary는 에러가 발생한 부분 대신 오류 메시지와 같은 Fallback UI를 표시할 수 있는 특수 컴포넌트입니다.
12731273
12741274
<Note>
1275-
Error boundaries do not catch errors for:
1275+
Error Boundary는 다음과 같은 경우 오류를 포착하지 못합니다.
12761276
1277-
- Event handlers [(learn more)](/learn/responding-to-events)
1278-
- [Server side rendering](/reference/react-dom/server)
1279-
- Errors thrown in the error boundary itself (rather than its children)
1280-
- Asynchronous code (e.g. `setTimeout` or `requestAnimationFrame` callbacks); an exception is the usage of the [`startTransition`](/reference/react/useTransition#starttransition) function returned by the [`useTransition`](/reference/react/useTransition) Hook. Errors thrown inside the transition function are caught by error boundaries [(learn more)](/reference/react/useTransition#displaying-an-error-to-users-with-error-boundary)
1277+
- 이벤트 핸들러 [(자세히 알아보기)](/learn/responding-to-events)
1278+
- [서버 사이드 렌더링](/reference/react-dom/server)
1279+
- (자식이 아닌) Error Boundary 자체에서 발생한 오류
1280+
- 비동기 코드(예: `setTimeout`이나 `requestAnimationFrame` 콜백). 단, [`useTransition`](/reference/react/useTransition) Hook이 반환하는 [`startTransition`](/reference/react/useTransition#starttransition) 함수를 사용하는 경우는 예외입니다. Transition 함수 내부에서 발생한 오류는 Error Boundary가 포착합니다. [(자세히 알아보기)](/reference/react/useTransition#displaying-an-error-to-users-with-error-boundary)
12811281
12821282
</Note>
12831283
12841284
Error Boundary 컴포넌트를 구현하려면 오류에 대한 응답으로 State를 업데이트하고 사용자에게 오류 메시지를 표시할 수 있는 [`static getDerivedStateFromError`](#static-getderivedstatefromerror)를 제공해야 합니다. 또한 선택적으로 [`componentDidCatch`](#componentdidcatch)를 구현하여 분석 서비스에 오류를 기록하는 등의 추가 로직을 추가할 수도 있습니다.
12851285
1286-
With [`captureOwnerStack`](/reference/react/captureOwnerStack) you can include the Owner Stack during development.
1286+
[`captureOwnerStack`](/reference/react/captureOwnerStack)을 사용하면 개발 환경에서 Owner Stack을 포함할 수 있습니다.
12871287
12881288
```js {9-12,14-27}
12891289
import * as React from 'react';

0 commit comments

Comments
 (0)