Skip to content

Commit a3df961

Browse files
DDOLDDOLtaehwanno
andauthored
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]>
1 parent e280c48 commit a3df961

File tree

1 file changed

+49
-48
lines changed

1 file changed

+49
-48
lines changed

Diff for: content/docs/concurrent-mode-reference.md

+49-48
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: concurrent-mode-reference
3-
title: Concurrent Mode API Reference (Experimental)
3+
title: Concurrent 모드 API 참고서 (실험 단계)
44
permalink: docs/concurrent-mode-reference.html
55
prev: concurrent-mode-adoption.html
66
---
@@ -14,19 +14,19 @@ prev: concurrent-mode-adoption.html
1414

1515
<div class="scary">
1616

17-
>Caution:
17+
>주의
1818
>
19-
>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의 일부가 되기 전에 경고 없이 크게 변경될 수 있습니다.
2020
>
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를 처음 접해본다면 이러한 기능들을 걱정하지 않아도 됩니다.** 그 기능들을 바로 배울 필요는 없습니다.
2222
2323
</div>
2424

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)을 확인해주세요.
2626

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는 변경될 수도 있습니다. 본인의 책임하에 사용하세요!**
2828

29-
- [Enabling Concurrent Mode](#concurrent-mode)
29+
- [Concurrent 모드 활성화](#concurrent-mode)
3030
- [`createRoot`](#createroot)
3131
- [`createBlockingRoot`](#createblockingroot)
3232
- [Suspense](#suspense)
@@ -35,29 +35,29 @@ This page is an API reference for the React [Concurrent Mode](/docs/concurrent-m
3535
- [`useTransition`](#usetransition)
3636
- [`useDeferredValue`](#usedeferredvalue)
3737

38-
## Enabling Concurrent Mode {#concurrent-mode}
38+
## Concurrent 모드 활성화 {#concurrent-mode}
3939

4040
### `createRoot` {#createroot}
4141

4242
```js
4343
ReactDOM.createRoot(rootNode).render(<App />);
4444
```
4545

46-
Replaces `ReactDOM.render(<App />, rootNode)` and enables Concurrent Mode.
46+
`ReactDOM.render(<App />, rootNode)`을 대체하고 Concurrent 모드를 활성화합니다.
4747

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)를 참고해주세요.
4949

5050
### `createBlockingRoot` {#createblockingroot}
5151

5252
```js
5353
ReactDOM.createBlockingRoot(rootNode).render(<App />)
5454
```
5555

56-
Replaces `ReactDOM.render(<App />, rootNode)` and enables [Blocking Mode](/docs/concurrent-mode-adoption.html#migration-step-blocking-mode).
56+
`ReactDOM.render(<App />, rootNode)`를 대체하고 [Blocking 모드](/docs/concurrent-mode-adoption.html#migration-step-blocking-mode)를 활성화합니다.
5757

58-
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 모드로 마이그레이션을 할 수 없습니다.
5959

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 모드의 일부만 포함하며 곧바로 마이그레이션 할 수 없는 앱의 중간 마이그레이션 단계로 사용됩니다.
6161

6262
## Suspense API {#suspense}
6363

@@ -70,13 +70,13 @@ Blocking Mode only contains a small subset of Concurrent Mode features and is in
7070
</Suspense>
7171
```
7272

73-
`Suspense` lets your components "wait" for something before they can render, showing a fallback while waiting.
73+
`Suspense`는 컴포넌트가 렌더링되기 전에 무언가를 "기다릴 수 있도록 하며", 기다리는 동안에 폴백을 보여줍니다.
7474

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>`의 모든 자식이 로드될 때까지 폴백을 계속 표시한다는 점에 주의해주세요.
7676

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는 제거될 수 있습니다.
8080

8181
### `<SuspenseList>` {#suspenselist}
8282

@@ -95,19 +95,19 @@ In this example, `ProfileDetails` is waiting for an asynchronous API call to fet
9595
</SuspenseList>
9696
```
9797

98-
`SuspenseList` helps coordinate many components that can suspend by orchestrating the order in which these components are revealed to the user.
98+
`SuspenseList`는 컴포넌트가 사용자에게 표시되는 순서를 조정하여 일시 중단 할 수 있는 많은 컴포넌트를 조정하는 데 도움을 줍니다.
9999

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는 이전 항목을 표시하기 전까지 목록에 있는 항목을 출력하지 않습니다. (이 동작은 수정할 수 있습니다)
101101

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`은 로드되지 않은 항목을 표시하지 않습니다.
109109

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` 컴포넌트를 중첩해 그리드를 형성할 수는 있습니다.
111111

112112
### `useTransition` {#usetransition}
113113

@@ -117,13 +117,13 @@ const SUSPENSE_CONFIG = { timeoutMs: 2000 };
117117
const [startTransition, isPending] = useTransition(SUSPENSE_CONFIG);
118118
```
119119

120-
`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**하기 전에 컨텐츠가 로드 될 때까지 대기함으로써 컴포넌트가 바람직하지 않은 로딩 상태를 피할 수 있게 해줍니다. 또한 컴포넌트가 더 중요한 업데이트를 즉시 렌더링 할 수 있도록 후속 렌더링까지 느린 데이터 가져오기를 지연시킬 수 있습니다.
121121

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의 방식입니다.
125125

126-
**If some state update causes a component to suspend, that state update should be wrapped in a transition.**
126+
**일부 상태 업데이트로 컴포넌트가 중단되면 해당 상태 업데이트는 transition으로 감싸져야 합니다.**
127127

128128
```js
129129
const SUSPENSE_CONFIG = { timeoutMs: 2000 };
@@ -153,21 +153,22 @@ function App() {
153153
}
154154
```
155155

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`에 표시된 시간) 지연시키면서 프로필 데이터를 바로 가져올 수 있습니다.
157157

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 중이라는 걸 알리기 때문에, 이전 프로필 페이지에 로딩 텍스트를 표시하여 사용자에게 알려줍니다.
159159

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)를 참고해주세요.**
161161

162162
#### useTransition Config {#usetransition-config}
163163

164164
```js
165165
const SUSPENSE_CONFIG = { timeoutMs: 2000 };
166166
```
167167

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에게 알려줍니다.
169169

170-
**Note: We recommend that you share Suspense Config between different modules.**
170+
171+
**주의: 여러 모듈 간에 Suspense Config를 공유하는 것이 좋습니다.**
171172

172173

173174
### `useDeferredValue` {#usedeferredvalue}
@@ -176,39 +177,39 @@ const SUSPENSE_CONFIG = { timeoutMs: 2000 };
176177
const deferredValue = useDeferredValue(value, { timeoutMs: 2000 });
177178
```
178179

179-
Returns a deferred version of the value that may "lag behind" it for at most `timeoutMs`.
180+
최대 `timeoutMS` 동안 "뒤처질 수 있는" 값의 지연된 버전을 반환하세요.
180181

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+
이는 흔히 사용자 입력을 기반으로 즉시 렌더링하거나 데이터 조회를 기다려야 할 때 인터페이스를 반응적으로 유지하는 데에 사용합니다.
182183

183-
A good example of this is a text input.
184+
이에 대한 좋은 예시는 텍스트 입력입니다.
184185

185186
```js
186187
function App() {
187188
const [text, setText] = useState("hello");
188-
const deferredText = useDeferredValue(text, { timeoutMs: 2000 });
189+
const deferredText = useDeferredValue(text, { timeoutMs: 2000 });
189190

190191
return (
191192
<div className="App">
192-
{/* Keep passing the current text to the input */}
193+
{/* input에 현재 텍스트를 계속 전달합니다. */}
193194
<input value={text} onChange={handleChange} />
194195
...
195-
{/* But the list is allowed to "lag behind" when necessary */}
196+
{/* 하지만 이 목록은 필요한 경우 "뒤처질" 수 있습니다. */}
196197
<MySlowList text={deferredText} />
197198
</div>
198199
);
199200
}
200201
```
201202

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초 동안 "뒤처져서" 백그라운드에서 현재 텍스트로 렌더링 할 수 있습니다.
203204

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)을 참고해주세요.**
205206

206207
#### useDeferredValue Config {#usedeferredvalue-config}
207208

208209
```js
209210
const SUSPENSE_CONFIG = { timeoutMs: 2000 };
210211
```
211212

212-
`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에게 알립니다.
213214

214-
React will always try to use a shorter lag when network and device allows it.
215+
React는 네트워크와 장치가 허용할 때 항상 더 짧은 지연을 사용하려고 합니다.

0 commit comments

Comments
 (0)