You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
concurrent-mode-API-reference.md has been commited (#192)
* concurrent-mode-API-reference.md has been commited
* Move translation to the original file for diff
* Apply suggestions from code review
* Update concurrent mode reference
* Apply suggestions from code review
Co-authored-by: Taehwan Noh <[email protected]>
>This page describes **experimental features that are [not yet available](/docs/concurrent-mode-adoption.html)in a stable release**. Don't rely on experimental builds of React in production apps. These features may change significantly and without a warning before they become a part of React.
19
+
>이 페이지는 **안정된 배포판에서는 [아직 사용할 수 없는](/docs/concurrent-mode-adoption.html)실험적인 기능들에 관해 설명합니다.** 프로덕션용 앱에선 React의 실험 배포판을 사용하지 마세요. 이 기능들은 React의 일부가 되기 전에 경고 없이 크게 변경될 수 있습니다.
20
20
>
21
-
>This documentation is aimed at early adopters and people who are curious. **If you're new to React, don't worry about these features**-- you don't need to learn them right now.
21
+
>이 문서는 얼리어답터들과 궁금해하시는 분들을 위해 제작된 문서입니다. **React를 처음 접해본다면 이러한 기능들을 걱정하지 않아도 됩니다.**그 기능들을 바로 배울 필요는 없습니다.
22
22
23
23
</div>
24
24
25
-
This page is an API reference for the React [Concurrent Mode](/docs/concurrent-mode-intro.html). If you're looking for a guided introduction instead, check out [Concurrent UI Patterns](/docs/concurrent-mode-patterns.html).
25
+
이 페이지는 React [Concurrent 모드](/docs/concurrent-mode-intro.html)에 대한 API 참고서입니다. 도입부에 대한 가이드를 찾고 있다면, [Concurrent UI 패턴](/docs/concurrent-mode-patterns.html)을 확인해주세요.
26
26
27
-
**Note: This is a Community Preview and not the final stable version. There will likely be future changes to these APIs. Use at your own risk!**
27
+
**주의: 이는 커뮤니티 프리뷰이며 최종적으로 안정된 배포판이 아닙니다. 향후에 이 API는 변경될 수도 있습니다. 본인의 책임하에 사용하세요!**
28
28
29
-
-[Enabling Concurrent Mode](#concurrent-mode)
29
+
-[Concurrent 모드 활성화](#concurrent-mode)
30
30
-[`createRoot`](#createroot)
31
31
-[`createBlockingRoot`](#createblockingroot)
32
32
-[Suspense](#suspense)
@@ -35,29 +35,29 @@ This page is an API reference for the React [Concurrent Mode](/docs/concurrent-m
35
35
-[`useTransition`](#usetransition)
36
36
-[`useDeferredValue`](#usedeferredvalue)
37
37
38
-
## Enabling Concurrent Mode {#concurrent-mode}
38
+
## Concurrent 모드 활성화 {#concurrent-mode}
39
39
40
40
### `createRoot` {#createroot}
41
41
42
42
```js
43
43
ReactDOM.createRoot(rootNode).render(<App />);
44
44
```
45
45
46
-
Replaces `ReactDOM.render(<App />, rootNode)` and enables Concurrent Mode.
46
+
`ReactDOM.render(<App />, rootNode)`을 대체하고 Concurrent 모드를 활성화합니다.
47
47
48
-
For more information on Concurrent Mode, check out the [Concurrent Mode documentation.](/docs/concurrent-mode-intro.html)
48
+
Concurrent 모드에 대한 더 자세한 설명이 필요하다면, [Concurrent Mode 문서](/docs/concurrent-mode-intro.html)를 참고해주세요.
Opting into Concurrent Mode introduces semantic changes to how React works. This means that you can't use Concurrent Mode in just a few components. Because of this, some apps may not be able to migrate directly to Concurrent Mode.
58
+
Concurrent 모드를 선택하면 React 작동하는 방식에 의미적 변화가 생깁니다. 이는 몇몇 컴포넌트에서 Concurrent 모드를 사용할 수 없다는 걸 의미하며 몇몇 앱은 곧바로 Concurrent 모드로 마이그레이션을 할 수 없습니다.
59
59
60
-
Blocking Mode only contains a small subset of Concurrent Mode features and is intended as an intermediary migration step for apps that are unable to migrate directly.
60
+
Blocking 모드는 Concurrent 모드의 일부만 포함하며 곧바로 마이그레이션 할 수 없는 앱의 중간 마이그레이션 단계로 사용됩니다.
61
61
62
62
## Suspense API {#suspense}
63
63
@@ -70,13 +70,13 @@ Blocking Mode only contains a small subset of Concurrent Mode features and is in
70
70
</Suspense>
71
71
```
72
72
73
-
`Suspense` lets your components "wait" for something before they can render, showing a fallback while waiting.
73
+
`Suspense`는 컴포넌트가 렌더링되기 전에 무언가를 "기다릴 수 있도록 하며", 기다리는 동안에 폴백을 보여줍니다.
74
74
75
-
In this example, `ProfileDetails` is waiting for an asynchronous API call to fetch some data. While we wait for `ProfileDetails` and `ProfilePhoto`, we will show the `Loading...`fallback instead. It is important to note that until all children inside `<Suspense>` has loaded, we will continue to show the fallback.
75
+
위 예시에서 `ProfileDetails`는 일부 데이터를 가져 오기 위해 비동기 API 호출을 기다리고 있습니다. `ProfileDetails`와 `ProfilePhoto`를 기다리는 동안에 `Loading...`폴백을 대신 보여줍니다. `<Suspense>`의 모든 자식이 로드될 때까지 폴백을 계속 표시한다는 점에 주의해주세요.
76
76
77
-
`Suspense` takes two props:
78
-
***fallback** takes a loading indicator. The fallback is shown until all of the children of the `Suspense`component have finished rendering.
79
-
***unstable_avoidThisFallback** takes a boolean. It tells React whether to "skip" revealing this boundary during the initial load. This API will likely be removed in a future release.
77
+
`Suspense`는 두 개의 props를 사용합니다.
78
+
***fallback**은 로딩 표시기를 받아들입니다. 폴백은 `Suspense`컴포넌트의 모든 자식이 렌더링을 마치기 전까지 표시됩니다.
79
+
***unstable_avoidThisFallback**은 boolean을 받아들입니다. 초기 로드할 때 이 경계를 보여주는 걸 건너뛸 지 말 지 React에게 알려줍니다. 향후 배포판에서 이 API는 제거될 수 있습니다.
80
80
81
81
### `<SuspenseList>` {#suspenselist}
82
82
@@ -95,19 +95,19 @@ In this example, `ProfileDetails` is waiting for an asynchronous API call to fet
95
95
</SuspenseList>
96
96
```
97
97
98
-
`SuspenseList` helps coordinate many components that can suspend by orchestrating the order in which these components are revealed to the user.
98
+
`SuspenseList`는 컴포넌트가 사용자에게 표시되는 순서를 조정하여 일시 중단 할 수 있는 많은 컴포넌트를 조정하는 데 도움을 줍니다.
99
99
100
-
When multiple components need to fetch data, this data may arrive in an unpredictable order. However, if you wrap these items in a `SuspenseList`, React will not show an item in the list until previous items have been displayed (this behavior is adjustable).
100
+
여러 컴포넌트가 데이터를 가져올 때 예상하지 못한 순서로 데이터가 도착할 수 있습니다. `SuspenseList`로 이러한 항목을 감싸면, React는 이전 항목을 표시하기 전까지 목록에 있는 항목을 출력하지 않습니다. (이 동작은 수정할 수 있습니다)
101
101
102
-
`SuspenseList` takes two props:
103
-
***revealOrder(forwards, backwards, together)** defines the order in which the `SuspenseList`children should be revealed.
104
-
*`together` reveals *all* of them when they're ready instead of one by one.
105
-
***tail (collapsed, hidden)** dictates how unloaded items in a `SuspenseList` is shown.
106
-
*By default, `SuspenseList` will show all fallbacks in the list.
107
-
*`collapsed` shows only the next fallback in the list.
108
-
*`hidden` doesn't show any unloaded items.
102
+
`SuspenseList`은 두 개의 props를 사용합니다.
103
+
***revealOrder(forwards, backwards, together)**는 `SuspenseList`자식이 표시되는 순서를 정의합니다.
104
+
*`together`는 하나씩 표시하지 않고 준비됐을 때 *모두 한번에* 표시합니다.
105
+
***tail (collapsed, hidden)**은 `SuspenseList`에서 로드되지 않은 항목을 표시하는 방법을 나타냅니다.
106
+
*기본적으로, `SuspenseList`는 목록에 있는 모든 폴백을 표시합니다.
107
+
*`collapsed`는 목록에서 다음 폴백만 표시합니다.
108
+
*`hidden`은 로드되지 않은 항목을 표시하지 않습니다.
109
109
110
-
Note that `SuspenseList`only operates on the closest`Suspense` and `SuspenseList`components below it. It does not search for boundaries deeper than one level. However, it is possible to nest multiple`SuspenseList`components in each other to build grids.
110
+
`SuspenseList`는 `SuspenseList`컴포넌트 아래에 있고 가장 인접한`Suspense`와 `SuspenseList`컴포넌트에만 동작한다는 점에 주의해주세요. 한 단계보다 깊은 경계는 검색하지 않지만 여러`SuspenseList`컴포넌트를 중첩해 그리드를 형성할 수는 있습니다.
`useTransition` allows components to avoid undesirable loading states by waiting for content to load before **transitioning to the next screen**. It also allows components to defer slower, data fetching updates until subsequent renders so that more crucial updates can be rendered immediately.
120
+
`useTransition`은 **다음 화면으로 transition**하기 전에 컨텐츠가 로드 될 때까지 대기함으로써 컴포넌트가 바람직하지 않은 로딩 상태를 피할 수 있게 해줍니다. 또한 컴포넌트가 더 중요한 업데이트를 즉시 렌더링 할 수 있도록 후속 렌더링까지 느린 데이터 가져오기를 지연시킬 수 있습니다.
121
121
122
-
The `useTransition`hook returns two values in an array.
123
-
*`startTransition` is a function that takes a callback. We can use it to tell React which state we want to defer.
124
-
*`isPending` is a boolean. It's React's way of informing us whether we're waiting for the transition to finish.
122
+
`useTransition`hook은 배열에서 두 개의 값을 반환합니다.
123
+
*`startTransition`은 callback을 받는 함수입니다. React에게 지연하고자 하는 상태를 말해주기 위해 이 함수를 사용할 수 있습니다.
124
+
*`isPending`은 boolean입니다. transition이 완료되기를 기다리고 있는지 알려주는 React의 방식입니다.
125
125
126
-
**If some state update causes a component to suspend, that state update should be wrapped in a transition.**
126
+
**일부 상태 업데이트로 컴포넌트가 중단되면 해당 상태 업데이트는 transition으로 감싸져야 합니다.**
127
127
128
128
```js
129
129
constSUSPENSE_CONFIG= { timeoutMs:2000 };
@@ -153,21 +153,22 @@ function App() {
153
153
}
154
154
```
155
155
156
-
In this code, we've wrapped our data fetching with `startTransition`. This allows us to start fetching the profile data right away, while deferring the render of the next profile page and its associated `Spinner` for 2 seconds (the time shown in `timeoutMs`).
156
+
위 코드에서 데이터 조회를 `startTransition`으로 감쌌습니다. 이를 통해 다음 프로필 페이지의 렌더링과 연관된 `Spinner`를 2초동안(`timeoutMS`에 표시된 시간) 지연시키면서 프로필 데이터를 바로 가져올 수 있습니다.
157
157
158
-
The `isPending`boolean lets React know that our component is transitioning, so we are able to let the user know this by showing some loading text on the previous profile page.
158
+
`isPending`boolean은 React에게 컴포넌트가 transition 중이라는 걸 알리기 때문에, 이전 프로필 페이지에 로딩 텍스트를 표시하여 사용자에게 알려줍니다.
159
159
160
-
**For an in-depth look at transitions, you can read [Concurrent UI Patterns](/docs/concurrent-mode-patterns.html#transitions).**
160
+
**Transition에 대한 자세한 내용은 [Concurrent UI 패턴](/docs/concurrent-mode-patterns.html#transitions)를 참고해주세요.**
161
161
162
162
#### useTransition Config {#usetransition-config}
163
163
164
164
```js
165
165
constSUSPENSE_CONFIG= { timeoutMs:2000 };
166
166
```
167
167
168
-
`useTransition` accepts an**optional Suspense Config** with a `timeoutMs`. This timeout (in milliseconds) tells React how long to wait before showing the next state (the new Profile Page in the above example).
168
+
`useTransition`은 `timeoutMS`가 포함된**선택적인 Suspense Config**를 허용합니다. 이 시간초과(밀리 초 내에 일어나는)는 다음 상태(위의 예시에서 새로운 프로필 페이지)를 표시하기 전에 기다리는 시간을 React에게 알려줍니다.
169
169
170
-
**Note: We recommend that you share Suspense Config between different modules.**
Returns a deferred version of the value that may "lag behind" it for at most `timeoutMs`.
180
+
최대 `timeoutMS` 동안 "뒤처질 수 있는" 값의 지연된 버전을 반환하세요.
180
181
181
-
This is commonly used to keep the interface responsive when you have something that renders immediately based on user input and something that needs to wait for a data fetch.
182
+
이는 흔히 사용자 입력을 기반으로 즉시 렌더링하거나 데이터 조회를 기다려야 할 때 인터페이스를 반응적으로 유지하는 데에 사용합니다.
{/*But the list is allowed to "lag behind" when necessary*/}
196
+
{/*하지만 이 목록은 필요한 경우 "뒤처질" 수 있습니다.*/}
196
197
<MySlowList text={deferredText} />
197
198
</div>
198
199
);
199
200
}
200
201
```
201
202
202
-
This allows us to start showing the new text for the `input` immediately, which allows the webpage to feel responsive. Meanwhile, `MySlowList` "lags behind" for up to 2 seconds according to the `timeoutMs` before updating, allowing it to render with the current text in the background.
203
+
이를 통해 `input`에 대한 새로운 텍스트를 즉시 표시 할 수 있으므로 웹페이지가 반응적으로 느껴지도록 합니다. 한편, `MySlowList`는 업데이트 전에 `timeoutMS`에 따라 최대 2초 동안 "뒤처져서" 백그라운드에서 현재 텍스트로 렌더링 할 수 있습니다.
203
204
204
-
**For an in-depth look at deferring values, you can read [Concurrent UI Patterns](/docs/concurrent-mode-patterns.html#deferring-a-value).**
205
+
**값의 지연에 대한 상세한 내용은 [Concurrent UI 패턴](/docs/concurrent-mode-patterns.html#deferring-a-value)을 참고해주세요.**
`useDeferredValue` accepts an**optional Suspense Config** with a `timeoutMs`. This timeout (in milliseconds) tells React how long the deferred value is allowed to lag behind.
213
+
`useDeferredValue`는 `timeoutMS`가 있는**선택적인 Suspense Config**를 허용합니다. 이 시간초과(밀리초 내에 일어나는)는 뒤처진 값이 얼마나 지연될 수 있는지 React에게 알립니다.
213
214
214
-
React will always try to use a shorter lag when network and device allows it.
0 commit comments