Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/content/reference/react-dom/client/hydrateRoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ root.unmount();
이 함수는 주로 React 루트의 DOM 노드(또는 그 조상 노드)가 다른 코드에 의해 DOM에서 제거될 수 있는 경우에 유용합니다. 예를 들어 DOM에서 비활성 탭을 제거하는 jQuery 탭 패널을 상상해 보세요. 탭이 제거되면 그 안에 있는 모든 것(내부의 React 루트를 포함)이 DOM에서 제거됩니다. 이 경우 `root.unmount`를 호출하여 제거된 루트의 콘텐츠 관리를 "중지"하도록 React에 지시해야 합니다. 그렇지 않으면 제거된 루트 내부의 컴포넌트는 구독과 같은 전역 리소스를 정리하고 확보하는 법을 모르는 채로 있게 됩니다.

`root.unmount`를 호출하면 루트에 있는 모든 컴포넌트가 마운트 해제되고, 트리상의 이벤트 핸들러나 State가 제거되며, 루트 DOM 노드에서 React가 "분리"됩니다.
Calling `root.unmount` will unmount all the components in the root and "detach" React from the root DOM node, including removing any event handlers or state in the tree.

#### 매개변수 {/*root-unmount-parameters*/}

Expand Down Expand Up @@ -316,9 +315,9 @@ export default function App() {

이 방법은 처음엔 서버와 동일한 결과물을 렌더링하여 불일치 문제를 피하고, Hydration 후에 새로운 결과물이 동기적으로 렌더링됩니다.

Use this approach when you want the client-rendered content to be different from the initial server-rendered HTML.
클라이언트에서 렌더링하는 콘텐츠가 처음 서버에서 렌더링한 HTML과 달라야 할 때 이 방법을 사용하세요.

If a component should render only in the browser, call [`use(browser())`](/reference/react/use#use-browser) instead of waiting for an Effect.
컴포넌트를 브라우저에서만 렌더링해야 한다면, Effect를 기다리는 대신 [`use(browser())`](/reference/react/use#use-browser)를 호출하세요.

<Pitfall>

Expand Down
6 changes: 1 addition & 5 deletions src/content/reference/react-dom/components/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ React는 `<style>` 컴포넌트를 문서의 `<head>`로 이동시키고, 동일

이 동작을 사용하려면 `href`와 `precedence` 속성을 제공하세요. React는 동일한 `href`를 가진 스타일의 중복을 제거합니다. `precedence` 속성은 문서의 `<head>` 내 다른 요소에 비해 `<style>` DOM 노드의 순위를 지정하며, 어떤 스타일시트가 다른 스타일시트를 덮어쓸 수 있는지를 결정합니다.

This special treatment comes with three caveats:

* React will ignore changes to props after the style has been rendered. (React will issue a warning in development if this happens.)
* React will drop all extraneous props when using the `precedence` prop (beyond `href` and `precedence`).
* React may leave the style in the DOM even after the component that rendered it has been unmounted.
위 특별한 처리에는 세 가지 주의 사항이 있습니다.

* 스타일이 렌더링된 후에는 React가 Props 변경을 무시합니다. (개발 중에 이 상황이 발생하면 React는 경고를 표시합니다.)
* React는 `precedence` Prop을 사용할 때 불필요한 Props를 제거합니다. (단, `href`와 `precedence`는 제외.)
Expand Down
12 changes: 5 additions & 7 deletions src/content/reference/react/Profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ title: <Profiler>
* `id`: 성능을 측정하는 UI 컴포넌트를 식별하기 위한 문자열입니다.
* `onRender`: 프로파일링된 트리 내의 컴포넌트가 업데이트될 때마다 React가 호출하는 [`onRender` 콜백](#onrender-callback)입니다. 렌더링된 내용과 소요된 시간에 대한 정보를 받습니다.

#### Caveats {/*caveats*/}
#### 주의 사항 {/*caveats*/}

* Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](/reference/dev-tools/react-performance-tracks#using-profiling-builds)

* 프로파일링은 추가적인 오버헤드를 더하기 때문에, **프로덕션 빌드에서는 기본적으로 비활성화 되어있습니다.** 프로덕션 프로파일링을 사용하려면, [프로파일링 기능이 활성화된 특수한 프로덕션 빌드](https://fb.me/react-profiling)를 사용해야 합니다.
* 프로파일링은 추가적인 오버헤드를 더하기 때문에, **프로덕션 빌드에서는 기본적으로 비활성화 되어있습니다.** 프로덕션 프로파일링을 사용하려면, [프로파일링 기능이 활성화된 특수한 프로덕션 빌드](/reference/dev-tools/react-performance-tracks#using-profiling-builds)를 사용해야 합니다.
---

### `onRender` 콜백 {/*onrender-callback*/}
Expand Down Expand Up @@ -82,16 +80,16 @@ UI 컴포넌트를 식별하기 위한 `id` 문자열과 트리 내의 컴포넌

<Pitfall>

Profiling adds some additional overhead, so **it is disabled in the production build by default.** To opt into production profiling, you need to enable a [special production build with profiling enabled.](/reference/dev-tools/react-performance-tracks#using-profiling-builds)
프로파일링은 추가적인 오버헤드를 더하기 때문에, **프로덕션 빌드에서는 기본적으로 비활성화 되어있습니다.** 프로덕션 프로파일링을 사용하려면, [프로파일링 기능이 활성화된 특수한 프로덕션 빌드](/reference/dev-tools/react-performance-tracks#using-profiling-builds)를 사용해야 합니다.

</Pitfall>

<Note>

`<Profiler>`는 프로그래밍 방식으로 측정값들을 모아줍니다. 상호작용할 수 있는 프로파일러를 찾고 있다면, [React 개발자 도구](/learn/react-developer-tools)의 프로파일러 탭을 사용해 보세요. 브라우저 확장 프로그램으로써 유사한 기능을 제공합니다.

Components wrapped in `<Profiler>` will also be marked in the [Component tracks](/reference/dev-tools/react-performance-tracks#components) of React Performance tracks even in profiling builds.
In development builds, all components are marked in the Components track regardless of whether they're wrapped in `<Profiler>`.
`<Profiler>`로 감싼 컴포넌트는 프로파일링 빌드에서도 React Performance 트랙의 [컴포넌트 트랙](/reference/dev-tools/react-performance-tracks#components)에 표시됩니다.
개발 빌드에서는 `<Profiler>`로 감쌌는지와 관계없이 모든 컴포넌트가 컴포넌트 트랙에 표시됩니다.

</Note>

Expand Down
Loading