Skip to content

Commit 3cad462

Browse files
committed
docs: resolve conflicts
1 parent d78c089 commit 3cad462

File tree

11 files changed

+17
-102
lines changed

11 files changed

+17
-102
lines changed

src/content/blog/2024/12/05/react-19.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,7 @@ function MyInput({placeholder, ref}) {
410410

411411
<Note>
412412

413-
<<<<<<< HEAD
414413
클래스에 전달된 `ref`는 컴포넌트 인스턴스를 참조하기 때문에 Props로 전달되지 않습니다.
415-
=======
416-
`ref`s passed to classes are not passed as props since they reference the component instance.
417-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
418414

419415
</Note>
420416

src/content/learn/preserving-and-resetting-state.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -671,17 +671,13 @@ label {
671671

672672
</Sandpack>
673673

674-
<<<<<<< HEAD
675-
체크 박스를 선택할 때 카운터 state가 초기화됩니다. `div`의 첫 번째 자식으로 `Counter`를 렌더링하는 것에서 `section`의 첫 번째 자식으로 바꾸지만요. 자식 `div`가 DOM에서 제거될 때 그것의 전체 하위 트리(`Counter`와 그 state를 포함해서)는 제거됩니다.
676-
=======
677-
The counter state gets reset when you click the checkbox. Although you render a `Counter`, the first child of the `div` changes from a `section` to a `div`. When the child `section` was removed from the DOM, the whole tree below it (including the `Counter` and its state) was destroyed as well.
678-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
674+
`Counter`의 State는 체크 박스를 선택할 때 초기화됩니다. 비록 `Counter`를 렌더링하지만, `div`의 첫 번째 자식이 `section`에서 `div`로 바뀝니다. 자식 `section`이 DOM에서 제거되었을 때, 그 아래 전체 트리(`Counter`와 그 State를 포함하여)도 함께 제거됩니다.
679675

680676
<DiagramGroup>
681677

682678
<Diagram name="preserving_state_diff_same_pt1" height={350} width={794} alt="Diagram with three sections, with an arrow transitioning each section in between. The first section contains a React component labeled 'div' with a single child labeled 'section', which has a single child labeled 'Counter' containing a state bubble labeled 'count' with value 3. The middle section has the same 'div' parent, but the child components have now been deleted, indicated by a yellow 'proof' image. The third section has the same 'div' parent again, now with a new child labeled 'div', highlighted in yellow, also with a new child labeled 'Counter' containing a state bubble labeled 'count' with value 0, all highlighted in yellow.">
683679

684-
`section` `div` 로 바뀌면, `section` 은 삭제되고 새로운 `div` 가 추가됩니다
680+
`section``div`로 바뀌면, `section`은 삭제되고 새로운 `div`가 추가됩니다.
685681

686682
</Diagram>
687683

@@ -691,17 +687,17 @@ The counter state gets reset when you click the checkbox. Although you render a
691687

692688
<Diagram name="preserving_state_diff_same_pt2" height={350} width={794} alt="Diagram with three sections, with an arrow transitioning each section in between. The first section contains a React component labeled 'div' with a single child labeled 'div', which has a single child labeled 'Counter' containing a state bubble labeled 'count' with value 0. The middle section has the same 'div' parent, but the child components have now been deleted, indicated by a yellow 'proof' image. The third section has the same 'div' parent again, now with a new child labeled 'section', highlighted in yellow, also with a new child labeled 'Counter' containing a state bubble labeled 'count' with value 0, all highlighted in yellow.">
693689

694-
다시 되돌리면, `div` 는 삭제되고 새로운 `section` 이 추가됩니다.
690+
다시 되돌리면, `div`는 삭제되고 새로운 `section`이 추가됩니다.
695691

696692
</Diagram>
697693

698694
</DiagramGroup>
699695

700-
경험상(rule of thumb) **리렌더링할 때 state를 유지하고 싶다면, 트리 구조가 "같아야" 합니다.** 만약 구조가 다르다면 React가 트리에서 컴포넌트를 지울 때 state로 지우기 때문에 state가 유지되지 않습니다.
696+
경험상<sup>Rule of Thumb</sup> **리렌더링할 때 State를 유지하고 싶다면, 트리 구조가 "같아야" 합니다.** 만약 구조가 다르다면 React가 트리에서 컴포넌트를 지울 때 State로 지우기 때문에 State가 유지되지 않습니다.
701697

702698
<Pitfall>
703699

704-
이것이 컴포넌트 함수를 중첩해서 정의하면 안 되는 이유입니다.
700+
이것이 컴포넌트 함수를 중첩해서 정의하면 안되는 이유입니다.
705701

706702
여기, `MyComponent` 안에서 `MyTextField` 컴포넌트 함수를 정의하고 있습니다.
707703

@@ -738,13 +734,13 @@ export default function MyComponent() {
738734
</Sandpack>
739735

740736

741-
버튼을 누를 때마다 입력 state가 사라집니다! 이것은 `MyComponent`를 렌더링할 때마다 *다른* `MyTextField` 함수가 만들어지기 때문입니다. 따라서 같은 함수에서 *다른* 컴포넌트를 렌더링할 때마다 React는 그 아래의 모든 state를 초기화합니다. 이런 문제를 피하려면 **항상 컴포넌트를 중첩해서 정의하지 않고 최상위 범위에서 정의해야 합니다.**
737+
버튼을 누를 때마다 입력 State가 사라집니다! 이것은 `MyComponent`를 렌더링할 때마다 *다른* `MyTextField` 함수가 만들어지기 때문입니다. 따라서 같은 함수에서 *다른* 컴포넌트를 렌더링할 때마다 React는 그 아래의 모든 state를 초기화합니다. 이런 문제를 피하려면 **항상 컴포넌트를 중첩해서 정의하지 않고 최상위 범위에서 정의해야 합니다.**
742738

743739
</Pitfall>
744740

745741
## 같은 위치에서 state를 초기화하기 {/*resetting-state-at-the-same-position*/}
746742

747-
기본적으로 React는 컴포넌트가 같은 위치를 유지하면 state를 유지합니다. 보통 이것이 당신이 원하는 행동이기 때문에 기본 동작으로서 타당합니다. 그러나 가끔 컴포넌트 state를 초기화하고 싶을 때가 있습니다. 두 선수가 턴마다 자신의 점수를 추적하는 앱을 한번 봅시다.
743+
기본적으로 React는 컴포넌트가 같은 위치를 유지하면 state를 유지합니다. 보통 이것이 당신이 원하는 행동이기 때문에 기본 동작으로서 타당합니다. 그러나 가끔 컴포넌트 State를 초기화하고 싶을 때가 있습니다. 두 선수가 턴마다 자신의 점수를 추적하는 앱을 한번 봅시다.
748744

749745
<Sandpack>
750746

src/content/learn/referencing-values-with-refs.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,7 @@ export default function Toggle() {
462462

463463
#### debouncing 수정 {/*fix-debouncing*/}
464464

465-
<<<<<<< HEAD
466-
예시에서 모든 버튼 클릭 핸들러는 ["debounced"](https://redd.one/blog/debounce-vs-throttle)입니다. 어떤 의미인지 보려면 버튼 중 하나를 누르세요. 1초 후에 메시지가 어떻게 표시되는지 확인해볼게요. 메시지 대기 중에 버튼을 누르면 타이머가 리셋됩니다. 따라서 같은 버튼을 여러 번 빠르게 클릭하면 *다음* 클릭이 멈출 때까지 메시지가 나타나지 않습니다. debouncing을 사용하면 사용자가 "작업이 중지될" 때까지 일부 작업을 지연시킬 수 있습니다.
467-
=======
468-
In this example, all button click handlers are ["debounced".](https://kettanaito.com/blog/debounce-vs-throttle) To see what this means, press one of the buttons. Notice how the message appears a second later. If you press the button while waiting for the message, the timer will reset. So if you keep clicking the same button fast many times, the message won't appear until a second *after* you stop clicking. Debouncing lets you delay some action until the user "stops doing things".
469-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
465+
예시에서 모든 버튼 클릭 핸들러는 ["debounced"](https://redd.one/blog/debounce-vs-throttle)됩니다. 어떤 의미인지 보려면 버튼 중 하나를 누르세요. 1초 후에 메시지가 어떻게 표시되는지 확인해볼게요. 메시지 대기 중에 버튼을 누르면 타이머가 리셋됩니다. 따라서 같은 버튼을 여러 번 빠르게 클릭하면 *다음* 클릭이 멈출 때까지 메시지가 나타나지 않습니다. Debouncing을 사용하면 사용자가 "작업이 중지될" 때까지 일부 작업을 지연시킬 수 있습니다.
470466

471467
예시는 작동하지만, 의도한 대로 작동하지 않습니다. 버튼은 독립적이지 않습니다. 문제를 보려면 버튼 중 하나를 클릭한 다음 즉시 다른 버튼을 클릭합니다. 지연된 후에 양쪽 버튼의 메시지를 볼 수 있을 것이라고 예상할 것입니다. 그러나 마지막 버튼의 메시지만 표시됩니다. 첫 번째 버튼의 메시지가 사라집니다.
472468

src/content/reference/react-dom/createPortal.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,7 @@ export default function ModalContent({ onClose }) {
239239
240240
Portal을 사용할 때 앱의 접근성<sup>accessibility, a11y</sup>이 준수되는지 확인하는 것이 중요합니다. 예를 들어 사용자가 Portal 안팎으로 자연스럽게 초점을 이동할 수 있도록 키보드 포커스를 관리해야 할 수 있습니다.
241241
242-
<<<<<<< HEAD
243-
모달을 만들 때는 [WAI-ARIA 모달 제작 관행](https://www.w3.org/WAI/ARIA/apg/#dialog_modal)을 따르세요. 커뮤니티 패키지를 사용하는 경우 해당 패키지가 접근 가능한지, 이 가이드라인을 따르고 있는지 확인하세요.
244-
=======
245-
Follow the [WAI-ARIA Modal Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal) when creating modals. If you use a community package, ensure that it is accessible and follows these guidelines.
246-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
242+
모달을 만들 때는 [WAI-ARIA 모달 제작 관행](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal)을 따르세요. 커뮤니티 패키지를 사용하는 경우 해당 패키지가 접근 가능한지, 이 가이드라인을 따르고 있는지 확인하세요.
247243
248244
</Pitfall>
249245

src/content/reference/react-dom/static/prerender.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,4 @@ Any Suspense boundaries with incomplete children will be included in the prelude
319319
320320
The `prerender` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
321321
322-
<<<<<<< HEAD
323322
To stream content as it loads, use a streaming server render API like [`renderToReadableStream`](/reference/react-dom/server/renderToReadableStream).
324-
=======
325-
To stream content as it loads, use a streaming server render API like [renderToReadableStream](/reference/react-dom/server/renderToReadableStream).
326-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91

src/content/reference/react-dom/static/prerenderToNodeStream.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,4 @@ Any Suspense boundaries with incomplete children will be included in the prelude
319319
320320
The `prerenderToNodeStream` response waits for the entire app to finish rendering, including waiting for all Suspense boundaries to resolve, before resolving. It is designed for static site generation (SSG) ahead of time and does not support streaming more content as it loads.
321321
322-
<<<<<<< HEAD
323322
To stream content as it loads, use a streaming server render API like [`renderToPipeableStream`](/reference/react-dom/server/renderToPipeableStream).
324-
325-
=======
326-
To stream content as it loads, use a streaming server render API like [renderToPipeableStream](/reference/react-dom/server/renderToPipeableStream).
327-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91

src/content/reference/react/createContext.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,11 @@ const ThemeContext = createContext('light');
3939

4040
`createContext` returns a context object.
4141

42-
<<<<<<< HEAD
43-
**컨텍스트 객체 자체는 어떠한 정보도 가지고 있지 않습니다.** 다른 컴포넌트가 읽거나 제공하는 어떤 컨텍스트를 나타냅니다. 일반적으로 상위 컴포넌트에서 컨텍스트 값을 지정하기 위해 [`SomeContext.Provider`](#provider)를 사용하고, 아래 컴포넌트에서 읽기 위해 [`useContext(SomeContext)`](/reference/react/useContext)를 호출합니다. 컨텍스트 객체에는 몇 가지 속성이 있습니다.
44-
45-
* `SomeContext.Provider`는 컴포넌트에 컨텍스트 값을 제공합니다.
46-
* `SomeContext.Consumer`는 컨텍스트 값을 읽는 대안이며 드물게 사용됩니다.
47-
=======
48-
**The context object itself does not hold any information.** It represents _which_ context other components read or provide. Typically, you will use [`SomeContext`](#provider) in components above to specify the context value, and call [`useContext(SomeContext)`](/reference/react/useContext) in components below to read it. The context object has a few properties:
42+
**컨텍스트 객체 자체는 어떠한 정보도 가지고 있지 않습니다.** 다른 컴포넌트가 읽거나 제공하는 어떤 컨텍스트를 나타냅니다. 일반적으로 상위 컴포넌트에서 컨텍스트 값을 지정하기 위해 [`SomeContext`](#provider)를 사용하고, 아래 컴포넌트에서 읽기 위해 [`useContext(SomeContext)`](/reference/react/useContext)를 호출합니다. 컨텍스트 객체에는 몇 가지 속성이 있습니다.
4943

5044
* `SomeContext` lets you provide the context value to components.
51-
* `SomeContext.Consumer` is an alternative and rarely used way to read the context value.
45+
* `SomeContext.Consumer`는 컨텍스트 값을 읽는 대안이며 드물게 사용됩니다.
5246
* `SomeContext.Provider` is a legacy way to provide the context value before React 19.
53-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
5447

5548
---
5649

@@ -228,12 +221,6 @@ function App() {
228221
const ThemeContext = createContext('light');
229222
```
230223

231-
<<<<<<< HEAD
232224
이 값은 절대 변경되지 않습니다. React는 상위에 일치하는 제공자를 찾을 수 없는 경우에만 이 값을 기본값으로 사용합니다.
233225

234226
컨텍스트가 시간에 따라 변경되도록 만들려면, [State를 추가하고 컴포넌트를 컨텍스트 제공자로 감싸세요.](/reference/react/useContext#updating-data-passed-via-context)
235-
=======
236-
This value never changes. React only uses this value as a fallback if it can't find a matching provider above.
237-
238-
To make context change over time, [add state and wrap components in a context provider.](/reference/react/useContext#updating-data-passed-via-context)
239-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91

src/content/reference/react/legacy.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,6 @@ title: "Legacy React API"
3030
* [`createFactory`](https://18.react.dev/reference/react/createFactory): 대신 JSX를 사용하세요.
3131
* 클래스 컴포넌트: [`static contextTypes`](https://18.react.dev//reference/react/Component#static-contexttypes): 대신 [`static contextType`](#static-contexttype)를 사용하세요.
3232
* 클래스 컴포넌트: [`static childContextTypes`](https://18.react.dev//reference/react/Component#static-childcontexttypes): 대신 [`static contextType`](#static-contexttype)를 사용하세요.
33-
* 클래스 컴포넌트: [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): 대신 [`Context.Provider`](/reference/react/createContext#provider)를 사용하세요.
33+
* 클래스 컴포넌트: [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): 대신 [`Context`](/reference/react/createContext#provider)를 사용하세요.
3434
* 클래스 컴포넌트: [`static propTypes`](https://18.react.dev//reference/react/Component#static-proptypes): 대신 [TypeScript](https://www.typescriptlang.org/)같은 타입 시스템을 사용하세요.
3535
* 클래스 컴포넌트: [`this.refs`](https://18.react.dev//reference/react/Component#refs): 대신 [`createRef`](/reference/react/createRef)를 사용하세요.
36-
37-
<<<<<<< HEAD
38-
=======
39-
* [`createFactory`](https://18.react.dev/reference/react/createFactory): use JSX instead.
40-
* Class Components: [`static contextTypes`](https://18.react.dev//reference/react/Component#static-contexttypes): use [`static contextType`](#static-contexttype) instead.
41-
* Class Components: [`static childContextTypes`](https://18.react.dev//reference/react/Component#static-childcontexttypes): use [`static contextType`](#static-contexttype) instead.
42-
* Class Components: [`static getChildContext`](https://18.react.dev//reference/react/Component#getchildcontext): use [`Context`](/reference/react/createContext#provider) instead.
43-
* Class Components: [`static propTypes`](https://18.react.dev//reference/react/Component#static-proptypes): use a type system like [TypeScript](https://www.typescriptlang.org/) instead.
44-
* Class Components: [`this.refs`](https://18.react.dev//reference/react/Component#refs): use [`createRef`](/reference/react/createRef) instead.
45-
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91

0 commit comments

Comments
 (0)