Skip to content

Commit d1f0a80

Browse files
committed
docs: resolve conflicts
1 parent f4617d8 commit d1f0a80

File tree

4 files changed

+4
-36
lines changed

4 files changed

+4
-36
lines changed

src/content/learn/reusing-logic-with-custom-hooks.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,11 +1332,7 @@ export function useOnlineStatus() {
13321332
13331333
위의 예시에서 `useOnlineStatus`는 한 쌍의 [`useState`](/reference/react/useState)와 [`useEffect`](/reference/react/useEffect)와 함께 실행됩니다. 하지만 이건 가장 좋은 해결 방법은 아닙니다. 이 해결 방법이 고려하지 못한 수많은 예외 상황이 존재합니다. 예를 들어, 이건 컴포넌트가 마운트됐을 때, `isOnline`이 이미 `true`라고 가정합니다. 하지만 이것은 네트워크가 이미 꺼졌을 때 틀린 가정이 됩니다. 이런 상황을 확인하기 위해 브라우저 [`navigator.onLine`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine) API를 사용할 수도 있습니다. 하지만 이걸 직접적으로 사용하게 되면 초기 HTML을 생성하기 위한 서버에선 동작하지 않습니다. 짧게 말하면 코드는 보완되어야 합니다.
13341334
1335-
<<<<<<< HEAD
1336-
운 좋게도 React 18은 이런 모든 문제를 신경 써주는 [`useSyncExternalStore`](/reference/react/useSyncExternalStore)라고 불리는 섬세한 API를 포함합니다. 여기 새 API의 장점을 가지고 다시 쓰인 `useOnlineStatus`이 있습니다.
1337-
=======
1338-
React includes a dedicated API called [`useSyncExternalStore`](/reference/react/useSyncExternalStore) which takes care of all of these problems for you. Here is your `useOnlineStatus` Hook, rewritten to take advantage of this new API:
1339-
>>>>>>> 5138e605225b24d25701a1a1f68daa90499122a4
1335+
React는 이런 모든 문제를 신경 써주는 [`useSyncExternalStore`](/reference/react/useSyncExternalStore)라고 불리는 섬세한 API를 포함합니다. 여기 새 API의 장점을 가지고 다시 쓰인 `useOnlineStatus`이 있습니다.
13401336
13411337
<Sandpack>
13421338

src/content/learn/tutorial-tic-tac-toe.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,11 +2254,7 @@ body {
22542254
22552255
</Sandpack>
22562256
2257-
<<<<<<< HEAD
22582257
`map`으로 `history` 배열을 반복할 때 전달한 함수 내에서 `squares` 인수는 `history`의 각 엘리먼트를 통과하고, `move` 인수는 각 배열 인덱스를 통과합니다: `0`, `1`, `2`, … (대부분은 실제 배열 엘리먼트가 필요하지만, 이 경우에는 이동 목록을 렌더링하기 위해 인덱스만 있어도 됩니다.)
2259-
=======
2260-
As you iterate through the `history` array inside the function you passed to `map`, the `squares` argument goes through each element of `history`, and the `move` argument goes through each array index: `0`, `1`, `2`, …. (In most cases, you'd need the actual array elements, but to render a list of moves you will only need indexes.)
2261-
>>>>>>> 5138e605225b24d25701a1a1f68daa90499122a4
22622258
22632259
틱택토 게임 history의 각 이동에 대해 버튼 `<button>`이 포함된 목록 항목 `<li>`를 생성하세요. 버튼에는 (아직 구현하지 않은) `jumpTo`라는 함수를 호출하는 `onClick` 핸들러가 있습니다.
22642260

src/content/reference/react/StrictMode.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,10 @@ Strict Mode 검사는 **개발 환경에서만 실행되지만**, 이미 코드
8787

8888
Strict Mode에서는 개발 시 다음과 같은 검사를 가능하게 합니다.
8989

90-
<<<<<<< HEAD
9190
- 컴포넌트가 순수하지 않은 렌더링으로 인한 버그를 찾기 위해 [추가로 다시 렌더링합니다.](#fixing-bugs-found-by-double-rendering-in-development)
9291
- 컴포넌트가 Effect 클린업이 누락되어 발생한 버그를 찾기 위해 [Effect를 다시 실행합니다.](#fixing-bugs-found-by-re-running-effects-in-development)
93-
- Your components will [re-run ref callbacks an extra time](#fixing-bugs-found-by-cleaning-up-and-re-attaching-dom-refs-in-development) to find bugs caused by missing ref cleanup.
92+
- Your components will [re-run refs callbacks an extra time](#fixing-bugs-found-by-re-running-ref-callbacks-in-development) to find bugs caused by missing ref cleanup.
9493
- 컴포넌트가 [더 이상 사용되지 않는 API를 사용하는지 확인합니다.](#fixing-deprecation-warnings-enabled-by-strict-mode)
95-
=======
96-
- Your components will [re-render an extra time](#fixing-bugs-found-by-double-rendering-in-development) to find bugs caused by impure rendering.
97-
- Your components will [re-run Effects an extra time](#fixing-bugs-found-by-re-running-effects-in-development) to find bugs caused by missing Effect cleanup.
98-
- Your components will [re-run ref callbacks an extra time](#fixing-bugs-found-by-re-running-ref-callbacks-in-development) to find bugs caused by missing ref cleanup.
99-
- Your components will [be checked for usage of deprecated APIs.](#fixing-deprecation-warnings-enabled-by-strict-mode)
100-
>>>>>>> 5138e605225b24d25701a1a1f68daa90499122a4
10194

10295

10396
**이러한 모든 검사는 개발 환경 전용이며 프로덕션 빌드에는 영향을 미치지 않습니다.**

src/content/reference/react/useSyncExternalStore.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,7 @@ subscribe 함수는 컴포넌트 내부에 정의되므로 리렌더링할 때
406406
407407
```js {2-5}
408408
function ChatIndicator() {
409-
<<<<<<< HEAD
410-
const isOnline = useSyncExternalStore(subscribe, getSnapshot);
411-
412-
// 🚩항상 다른 함수를 사용하므로 React는 렌더링할 때마다 다시 구독합니다.
413-
=======
414-
// 🚩 Always a different function, so React will resubscribe on every re-render
415-
>>>>>>> 5138e605225b24d25701a1a1f68daa90499122a4
409+
// 🚩 항상 다른 함수를 사용하므로 React는 렌더링할 때마다 다시 구독합니다.
416410
function subscribe() {
417411
// ...
418412
}
@@ -426,18 +420,13 @@ function ChatIndicator() {
426420
리렌더링 사이에 다른 `subscribe` 함수를 전달하면 React가 store를 다시 구독합니다. 이로 인해 성능 문제가 발생하고 store 재구독을 피하고 싶다면 `subscribe` 함수를 외부로 이동하세요.
427421
428422
```js {1-4}
429-
//Always the same function, so React won't need to resubscribe
423+
//항상 동일한 함수이므로 React는 다시 구독할 필요가 없습니다.
430424
function subscribe() {
431425
// ...
432426
}
433427

434-
<<<<<<< HEAD
435-
// ✅ 항상 동일한 함수이므로 React는 다시 구독할 필요가 없습니다.
436-
function subscribe() {
437-
=======
438428
function ChatIndicator() {
439429
const isOnline = useSyncExternalStore(subscribe, getSnapshot);
440-
>>>>>>> 5138e605225b24d25701a1a1f68daa90499122a4
441430
// ...
442431
}
443432
```
@@ -446,13 +435,7 @@ function ChatIndicator() {
446435
447436
```js {2-5}
448437
function ChatIndicator({ userId }) {
449-
<<<<<<< HEAD
450-
const isOnline = useSyncExternalStore(subscribe, getSnapshot);
451-
452438
// ✅ userId가 변경되지 않는 한 동일한 함수입니다.
453-
=======
454-
// ✅ Same function as long as userId doesn't change
455-
>>>>>>> 5138e605225b24d25701a1a1f68daa90499122a4
456439
const subscribe = useCallback(() => {
457440
// ...
458441
}, [userId]);

0 commit comments

Comments
 (0)