diff --git a/src/content/reference/react/Suspense.md b/src/content/reference/react/Suspense.md
index 223507a6c..b5bea7086 100644
--- a/src/content/reference/react/Suspense.md
+++ b/src/content/reference/react/Suspense.md
@@ -36,25 +36,25 @@ title:
---
-### What activates a Suspense boundary {/*what-activates-a-suspense-boundary*/}
+### Suspense 경계가 활성화되는 경우 {/*what-activates-a-suspense-boundary*/}
-A Suspense boundary waits for its content to be ready before revealing it. Any of the following keeps a boundary from revealing its content:
+Suspense 경계는 콘텐츠가 준비될 때까지 기다렸다가 보여줍니다. 다음 중 하나라도 해당하면 경계는 콘텐츠를 보여주지 않고 기다립니다.
-- Lazy-loading component code with [`lazy`](/reference/react/lazy).
-- Reading a Promise with [`use`](/reference/react/use), including data streamed from [Server Components](/reference/rsc/server-components) or loaded through a [Suspense-enabled framework](#suspense-enabled-frameworks).
-- Loading a stylesheet rendered with [`` and a `precedence` prop.](/reference/react-dom/components/link#special-rendering-behavior) React blocks the boundary until the stylesheet loads, up to a timeout. [See an example below.](#waiting-for-a-stylesheet-to-load)
-- Waiting for a large boundary's HTML to arrive during streaming server rendering. Sending HTML takes time, so a boundary with enough content activates even when nothing in it suspends. React reveals the content as the HTML arrives.
-- Loading fonts. Suspense doesn't wait for fonts by default, but when a [``](/reference/react/ViewTransition) animates a boundary's reveal, React waits up to 500 ms for new fonts to load so text doesn't flash with a fallback font. [See an example below.](#waiting-for-a-font-to-load)
-- Loading images. Suspense doesn't wait for images by default, but when a [``](/reference/react/ViewTransition) animates a boundary's reveal, React waits up to 500 ms for visible images to load before starting the animation. Setting `loading="lazy"` or adding an `onLoad` handler opts a specific image out. [See an example below.](#waiting-for-an-image-to-load)
-- Performing CPU-bound render work inside a [``](#props) boundary.
+- [`lazy`](/reference/react/lazy)로 컴포넌트 코드를 지연 로딩하는 경우.
+- [`use`](/reference/react/use)로 Promise를 읽는 경우. [서버 컴포넌트](/reference/rsc/server-components)에서 스트리밍된 데이터나 [Suspense를 지원하는 프레임워크](#suspense-enabled-frameworks)로 불러온 데이터도 포함됩니다.
+- [``와 `precedence` Prop으로 렌더링한 스타일시트](/reference/react-dom/components/link#special-rendering-behavior)를 로딩하는 경우. React는 스타일시트가 로딩될 때까지 경계를 막아 둡니다. 단, 제한 시간이 지나면 더 기다리지 않습니다. [아래 예시를 참고하세요.](#waiting-for-a-stylesheet-to-load)
+- 스트리밍 서버 렌더링 중 큰 경계의 HTML이 도착하기를 기다리는 경우. HTML을 보내는 데는 시간이 걸리므로, 콘텐츠가 충분히 많은 경계는 그 안에서 아무것도 지연되지 않더라도 활성화됩니다. React는 HTML이 도착하는 대로 콘텐츠를 보여줍니다.
+- 폰트를 로딩하는 경우. Suspense는 기본적으로 폰트를 기다리지 않습니다. 하지만 [``](/reference/react/ViewTransition)이 경계의 콘텐츠가 나타나는 과정을 애니메이션으로 처리할 때는, 텍스트가 대체 폰트로 잠깐 보이지 않도록 React가 새 폰트의 로딩을 최대 500ms까지 기다립니다. [아래 예시를 참고하세요.](#waiting-for-a-font-to-load)
+- 이미지를 로딩하는 경우. Suspense는 기본적으로 이미지를 기다리지 않습니다. 하지만 [``](/reference/react/ViewTransition)이 경계의 콘텐츠가 나타나는 과정을 애니메이션으로 처리할 때는, React가 애니메이션을 시작하기 전에 화면에 보이는 이미지의 로딩을 최대 500ms까지 기다립니다. `loading="lazy"`를 설정하거나 `onLoad` 핸들러를 추가한 이미지는 기다리지 않습니다. [아래 예시를 참고하세요.](#waiting-for-an-image-to-load)
+- [``](#props) 경계 안에서 CPU 부하가 큰 렌더링 작업을 수행하는 경우.
-#### Suspense-enabled frameworks {/*suspense-enabled-frameworks*/}
+#### Suspense를 지원하는 프레임워크 {/*suspense-enabled-frameworks*/}
-A *Suspense-enabled framework* gives you a way to read data in your component in a way that activates the closest Suspense boundary. The exact way you load your data depends on your framework, and you'll find the details in its documentation. Under the hood, a Suspense-enabled framework maintains a cache of Promises and calls [`use`](/reference/react/use) to suspend on a Promise.
+*Suspense를 지원하는 프레임워크*를 사용하면 가장 가까운 Suspense 경계를 활성화하는 방식으로 컴포넌트에서 데이터를 읽을 수 있습니다. 데이터를 불러오는 정확한 방법은 프레임워크마다 다르며, 자세한 내용은 해당 프레임워크의 문서에서 확인할 수 있습니다. 내부적으로 Suspense를 지원하는 프레임워크는 Promise 캐시를 관리하고, [`use`](/reference/react/use)를 호출해 Promise가 처리될 때까지 지연합니다.
-Without a framework, you can read a Promise with `use` directly, as long as the Promise is [cached so the same instance is reused across renders.](/reference/react/use#caching-promises-for-client-components)
+프레임워크 없이도 Promise가 [캐시되어 렌더링 사이에 같은 인스턴스가 재사용된다면](/reference/react/use#caching-promises-for-client-components) `use`로 Promise를 직접 읽을 수 있습니다.
@@ -227,19 +227,7 @@ async function getAlbums() {
-By contrast, code that fetches data outside of `use`, such as inside an Effect, does not activate the boundary:
-
-**Suspense가 가능한 데이터만이 Suspense 컴포넌트를 활성화합니다.** 아래와 같은 것들이 해당합니다.
-
-- [Relay](https://relay.dev/docs/guided-tour/rendering/loading-states/)와 [Next.js](https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming#streaming-with-suspense) 같이 Suspense가 가능한 프레임워크를 사용한 데이터 가져오기.
-- [`lazy`](/reference/react/lazy)를 활용한 지연 로딩 컴포넌트.
-- [`use`](/reference/react/use)를 사용해서 캐시된 Promise 값 읽기.
-
-Suspense는 Effect 또는 이벤트 핸들러 내부에서 가져오는 데이터를 감지하지 **않습니다**.
-
-위의 `Albums` 컴포넌트에서 데이터를 로딩하는 정확한 방법은 프레임워크마다 다릅니다. Suspense가 가능한 프레임워크를 사용하는 경우, 프레임워크의 데이터 불러오기 관련 문서에서 자세한 내용을 확인할 수 있습니다.
-
-독단적인 프레임워크를 사용하지 않는 Suspense가 가능한 데이터 가져오기 기능은 아직 지원되지 않습니다. Suspense 지원 데이터 소스를 구현하기 위한 요구 사항은 불안정하고 문서화되지 않았습니다. 데이터 소스를 Suspense와 통합하기 위한 공식 API는 향후 React 버전에서 출시될 예정입니다.
+반면 Effect 내부처럼 `use` 바깥에서 데이터를 가져오는 코드는 경계를 활성화하지 않습니다.
@@ -281,6 +269,8 @@ export default function ArtistPage({ artist }) {
>
);
+}
+
function Loading() {
return
🌀 Loading...
;
}
@@ -405,7 +395,7 @@ async function getAlbums() {
-During streaming server rendering, a boundary also activates while its HTML is still streaming in. With any streaming server rendering API, React sends [the shell](/reference/react-dom/server/renderToPipeableStream#specifying-what-goes-into-the-shell) with the `fallback` first, then streams in each boundary's HTML and swaps out its `fallback` as that content arrives. Press "Render the page" to watch the page stream in:
+스트리밍 서버 렌더링 중에는 HTML이 아직 스트리밍되는 동안에도 경계가 활성화됩니다. 어떤 스트리밍 서버 렌더링 API를 사용하든 React는 `fallback`이 포함된 [셸](/reference/react-dom/server/renderToPipeableStream#specifying-what-goes-into-the-shell)을 먼저 보낸 다음, 각 경계의 HTML을 스트리밍하면서 콘텐츠가 도착하는 대로 `fallback`을 교체합니다. "Render the page"를 눌러 페이지가 스트리밍되는 모습을 확인해 보세요.
@@ -2268,15 +2258,98 @@ main {
### Navigation에서 Suspense 재설정하기 {/*resetting-suspense-boundaries-on-navigation*/}
-Transition이 진행되는 동안 React는 이미 보인 콘텐츠를 숨기지 않습니다. 하지만 다른 매개변수가 있는 경로로 이동하는 경우 React에 *다른* 콘텐츠라고 알려주고 싶을 수 있습니다. 이를 `key`로 표현할 수 있습니다.
+Transition이 진행되는 동안 React는 이미 보인 콘텐츠를 숨기지 않습니다. 하지만 다른 사용자의 프로필처럼 *다른* 콘텐츠로 이동할 때는 이전 콘텐츠 대신 경계가 Fallback을 보여주기를 원할 것입니다. 이를 `key`로 표현할 수 있습니다.
```js
```
-사용자의 프로필 페이지 내에서 이동 중인데 무언가가 지연되었다고 가정해 보세요. 해당 업데이트가 Transition으로 감싸져 있으면 이미 표시된 콘텐츠에 대한 Fallback이 트리거되지 않습니다. 이것이 예상되는 동작입니다.
+`key`가 달라지면 React는 각 프로필을 서로 다른 콘텐츠로 취급하고, 이동하는 동안 Suspense 경계를 재설정합니다. `key`는 경계 자체에 지정해도 되고 경계 위의 컴포넌트에 지정해도 됩니다. Suspense 통합 라우터는 이 동작을 자동으로 수행해야 합니다.
+
+아래 예시에서 프로필 페이지를 열면 첫 번째 프로필을 불러옵니다. "Bob"을 누르면 다른 프로필로 이동하고, `key`가 경계를 재설정하므로 이전 사용자의 소개 대신 Fallback이 표시됩니다. `key`를 제거해 보세요. 다음 소개를 불러오는 동안 이전 소개가 계속 보입니다.
+
+
+
+```js src/App.js hidden
+import { useState } from 'react';
+import ProfilePage from './ProfilePage.js';
+
+export default function App() {
+ const [show, setShow] = useState(false);
+ if (show) {
+ return ;
+ }
+ return (
+
+ );
+}
+```
+
+```js src/ProfilePage.js active
+import { Suspense, useState, startTransition } from 'react';
+import Bio from './Bio.js';
+import { fetchBio } from './data.js';
+
+export default function ProfilePage() {
+ const [user, setUser] = useState(() => ({
+ id: 'alice',
+ bioPromise: fetchBio('alice'),
+ }));
+ function navigate(id) {
+ startTransition(() => {
+ setUser({ id, bioPromise: fetchBio(id) });
+ });
+ }
+ return (
+ <>
+
+
+ ⌛ Loading profile...
}>
+
+
+ >
+ );
+}
+```
+
+```js src/Bio.js
+import { use } from 'react';
+
+export default function Bio({ bioPromise }) {
+ const bio = use(bioPromise);
+ return
{bio}
;
+}
+```
+
+```js src/data.js hidden
+// Note: the way you would do data fetching depends on
+// the framework that you use together with Suspense.
+
+export async function fetchBio(userId) {
+ // Add a fake delay to make waiting noticeable.
+ await new Promise(resolve => {
+ setTimeout(resolve, 1500);
+ });
+
+ return userId === 'alice'
+ ? 'Alice is a photographer and traveler.'
+ : 'Bob collects vintage synthesizers.';
+}
+```
+
+```css
+button {
+ margin-right: 8px;
+}
+```
-하지만 이제 두 개의 서로 다른 사용자 프로필 사이를 이동한다고 가정해 보겠습니다. 이 경우 Fallback을 표시하는 것이 좋습니다. 예를 들어 한 사용자의 타임라인이 다른 사용자의 타임라인과 *다른 콘텐츠*라고, 가정해 보겠습니다. `key`를 지정하면 React가 서로 다른 사용자의 프로필을 서로 다른 컴포넌트로 취급하고 탐색하는 동안 Suspense를 재설정하도록 할 수 있습니다. Suspense 통합 라우터는 이 동작을 자동으로 수행해야 합니다.
+
---
@@ -2305,11 +2378,11 @@ function Chat() {
---
-### Providing a fallback for browser-only content {/*providing-a-fallback-for-browser-only-content*/}
+### 브라우저 전용 콘텐츠에 대한 Fallback 제공하기 {/*providing-a-fallback-for-browser-only-content*/}
-A Suspense boundary can provide a fallback for a browser-only component. Wrap the component in `` and call [`use(browser())`](/reference/react/use#use-browser) inside it.
+Suspense 경계로 브라우저 전용 컴포넌트에 대한 Fallback을 제공할 수 있습니다. 컴포넌트를 ``로 감싸고, 컴포넌트 안에서 [`use(browser())`](/reference/react/use#use-browser)를 호출하세요.
-Click **Reload** to see the loading fallback in the initial HTML. After hydration, React displays the draft loaded from `localStorage`.
+**Reload**를 클릭하면 초기 HTML에 포함된 로딩 Fallback을 볼 수 있습니다. Hydration이 끝나면 React는 `localStorage`에서 불러온 초안을 표시합니다.
@@ -2453,17 +2526,17 @@ iframe {
-During server rendering, React includes the Suspense boundary's fallback in the HTML. In the browser, React replaces the fallback with the saved draft.
+서버 렌더링 중에 React는 Suspense 경계의 Fallback을 HTML에 포함합니다. 브라우저에서는 React가 Fallback을 저장된 초안으로 교체합니다.
---
-### Waiting for a stylesheet to load {/*waiting-for-a-stylesheet-to-load*/}
+### 스타일시트 로딩 기다리기 {/*waiting-for-a-stylesheet-to-load*/}
-A stylesheet rendered with [`` and a `precedence` prop](/reference/react-dom/components/link#special-rendering-behavior) blocks the Suspense boundary until the stylesheet loads, up to a timeout, so the content doesn't appear unstyled.
+[``와 `precedence` Prop으로 렌더링한 스타일시트](/reference/react-dom/components/link#special-rendering-behavior)는 콘텐츠가 스타일 없이 나타나지 않도록 스타일시트가 로딩될 때까지 Suspense 경계를 막아 둡니다. 단, 제한 시간이 지나면 더 기다리지 않습니다.
-In the example below, the `Card` component renders a stylesheet with `precedence`. Press "Show card": React shows the fallback until the stylesheet has loaded, and then reveals the card with its styles applied.
+아래 예시에서 `Card` 컴포넌트는 `precedence`가 지정된 스타일시트를 렌더링합니다. "Show card"를 누르면 React는 스타일시트가 로딩될 때까지 Fallback을 보여주고, 그다음 스타일이 적용된 카드를 보여줍니다.
-For comparison, the second button performs the same update without React, in a separate document. Nothing waits for the stylesheet, so the card's text appears in a fallback font first and then switches:
+비교를 위해 두 번째 버튼은 같은 업데이트를 React 없이 별도의 문서에서 수행합니다. 스타일시트를 기다리는 것이 없으므로 카드의 텍스트가 먼저 대체 폰트로 나타났다가 바뀝니다.
@@ -2584,9 +2657,9 @@ hr {
---
-### Animating from Suspense content {/*animating-from-suspense-content*/}
+### Suspense 콘텐츠에서 애니메이션 적용하기 {/*animating-from-suspense-content*/}
-Suspense composes with [``](/reference/react/ViewTransition) to animate the swap from the fallback to the content. Wrap the boundary in a ``, and React treats the swap as an update, cross-fading between the fallback and the content by default:
+Suspense를 [``](/reference/react/ViewTransition)과 함께 사용하면 Fallback이 콘텐츠로 바뀌는 과정에 애니메이션을 적용할 수 있습니다. 경계를 ``으로 감싸면 React는 이 교체를 업데이트로 취급하고, 기본적으로 Fallback과 콘텐츠 사이를 크로스 페이드합니다.
@@ -2814,21 +2887,21 @@ button:hover {
-Where you place the `` relative to the boundary determines whether the fallback and content cross-fade as one update or animate as separate exit and enter animations. You can also [customize the animation](/reference/react/ViewTransition#customizing-animations) with View Transition classes.
+``을 경계의 어느 쪽에 두느냐에 따라 Fallback과 콘텐츠가 하나의 업데이트로 크로스 페이드될지, 별도의 exit 및 enter 애니메이션으로 처리될지가 결정됩니다. View Transition 클래스로 [애니메이션을 커스터마이징](/reference/react/ViewTransition#customizing-animations)할 수도 있습니다.
-[Learn more about animating from Suspense content.](/reference/react/ViewTransition#animating-from-suspense-content)
+[Suspense 콘텐츠에서 애니메이션을 적용하는 방법을 자세히 알아보세요.](/reference/react/ViewTransition#animating-from-suspense-content)
---
-### Waiting for a font to load {/*waiting-for-a-font-to-load*/}
+### 폰트 로딩 기다리기 {/*waiting-for-a-font-to-load*/}
-When a [``](/reference/react/ViewTransition) animates a Suspense boundary's reveal, React waits up to 500 ms for new fonts the content introduces so the text doesn't flash with a fallback font. This only happens during a `` update.
+[``](/reference/react/ViewTransition)이 Suspense 경계의 콘텐츠가 나타나는 과정을 애니메이션으로 처리할 때, React는 텍스트가 대체 폰트로 잠깐 보이지 않도록 콘텐츠가 새로 사용하는 폰트를 최대 500ms까지 기다립니다. 이 동작은 `` 업데이트 중에만 일어납니다.
-In the example below, the Suspense boundary is wrapped in a ``, and the `Quote` component suspends while its data loads. Rendering the quote loads a stylesheet that introduces the font. React keeps the fallback visible while the stylesheet and font load. If the font loads within the 500 ms limit, the quote appears already in its font.
+아래 예시에서 Suspense 경계는 ``으로 감싸져 있고, `Quote` 컴포넌트는 데이터를 로딩하는 동안 지연됩니다. 인용문을 렌더링하면 폰트를 정의하는 스타일시트를 불러옵니다. React는 스타일시트와 폰트가 로딩되는 동안 Fallback을 계속 보여줍니다. 폰트가 500ms 안에 로딩되면 인용문은 처음부터 해당 폰트로 나타납니다.
-For comparison, the second button performs the same update without React. Nothing waits for the font, so the text appears in a fallback font first and then switches:
+비교를 위해 두 번째 버튼은 같은 업데이트를 React 없이 수행합니다. 폰트를 기다리는 것이 없으므로 텍스트가 먼저 대체 폰트로 나타났다가 바뀝니다.
@@ -2987,11 +3060,11 @@ hr {
---
-### Waiting for an image to load {/*waiting-for-an-image-to-load*/}
+### 이미지 로딩 기다리기 {/*waiting-for-an-image-to-load*/}
-When a Suspense boundary reveals content inside a [``](/reference/react/ViewTransition), React waits up to 500 ms for visible images to load before starting the animation. Setting `loading="lazy"` or adding an `onLoad` handler opts an image out.
+Suspense 경계가 [``](/reference/react/ViewTransition) 안에서 콘텐츠를 보여줄 때, React는 애니메이션을 시작하기 전에 화면에 보이는 이미지의 로딩을 최대 500ms까지 기다립니다. `loading="lazy"`를 설정하거나 `onLoad` 핸들러를 추가한 이미지는 기다리지 않습니다.
-Compare the same boundary inside and outside a ``. Inside, React keeps the profile skeleton visible for up to 500 ms while the image loads, so the card can be revealed with its image already in place. Outside, Suspense stops showing the skeleton as soon as the Promise resolves. If the image is still loading, the card appears first and the image pops in afterward:
+같은 경계를 `` 안과 밖에 두고 비교해 보세요. 안쪽에서는 이미지가 로딩되는 동안 React가 프로필 스켈레톤을 최대 500ms까지 보여주므로, 이미지가 이미 자리 잡은 상태로 카드가 나타날 수 있습니다. 바깥쪽에서는 Promise가 이행되자마자 Suspense가 스켈레톤을 더 이상 보여주지 않습니다. 이미지가 아직 로딩 중이라면 카드가 먼저 나타나고 이미지는 뒤늦게 나타납니다.
@@ -3118,11 +3191,11 @@ hr {
---
-### Coordinating fonts, images, and stylesheets {/*coordinating-fonts-images-and-stylesheets*/}
+### 폰트, 이미지, 스타일시트 함께 기다리기 {/*coordinating-fonts-images-and-stylesheets*/}
-A Suspense boundary can wait for data, stylesheets, fonts, and images at once. Waiting for fonts and images only happens during a [``](/reference/react/ViewTransition) update. In the example below, the `ProfileCard` component suspends while its data loads, and renders a stylesheet with `precedence`, text in a new font, and a portrait. React keeps the skeleton visible while the data and the stylesheet load. The `` reveal then waits for the font and the image, so the card appears complete.
+Suspense 경계는 데이터, 스타일시트, 폰트, 이미지를 한꺼번에 기다릴 수 있습니다. 폰트와 이미지를 기다리는 동작은 [``](/reference/react/ViewTransition) 업데이트 중에만 일어납니다. 아래 예시에서 `ProfileCard` 컴포넌트는 데이터를 로딩하는 동안 지연되며, `precedence`가 지정된 스타일시트, 새 폰트로 된 텍스트, 인물 사진을 렌더링합니다. React는 데이터와 스타일시트가 로딩되는 동안 스켈레톤을 계속 보여줍니다. 그다음 ``이 폰트와 이미지를 기다린 뒤 콘텐츠를 보여주므로, 카드가 완성된 상태로 나타납니다.
-For comparison, the version without React loads the same data and shows every resource arriving on its own schedule:
+비교를 위해 React를 사용하지 않는 버전은 같은 데이터를 불러오지만, 각 리소스를 도착하는 대로 따로따로 보여줍니다.