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
Copy file name to clipboardExpand all lines: src/content/reference/react/Suspense.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2380,7 +2380,7 @@ A stylesheet rendered with [`<link rel="stylesheet">` and a `precedence` prop](/
2380
2380
2381
2381
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.
2382
2382
2383
-
For comparison, the second button performs the same update with plain DOM in a separate document, without React. Nothing waits for the stylesheet, so the card's text appears in a fallback font first and then switches:
2383
+
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:
2384
2384
2385
2385
<Sandpack>
2386
2386
@@ -2450,7 +2450,7 @@ export default function VanillaCard() {
@@ -2745,7 +2745,7 @@ When a [`<ViewTransition>`](/reference/react/ViewTransition) animates a Suspense
2745
2745
2746
2746
In the example below, the Suspense boundary is wrapped in a `<ViewTransition>`, and the `Quote` component suspends while its data loads. Rendering the quote starts its font download. React keeps the fallback visible until the font has loaded, so the quote appears already in its font.
2747
2747
2748
-
For comparison, the second button performs the same update with plain DOM, without React. Nothing waits for the font, so the text appears in a fallback font first and then switches:
2748
+
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:
2749
2749
2750
2750
<Sandpack>
2751
2751
@@ -2815,7 +2815,7 @@ export default function VanillaQuote() {
@@ -2895,7 +2895,7 @@ When a [`<ViewTransition>`](/reference/react/ViewTransition) animates a Suspense
2895
2895
2896
2896
In the example below, the Suspense boundary is wrapped in a `<ViewTransition>` and shows a profile skeleton until the portrait has loaded.
2897
2897
2898
-
For comparison, the second button performs the same update with plain DOM, without React. Nothing waits for the image, so the card appears immediately and the image pops in when it loads:
2898
+
For comparison, the second button performs the same update without React. Nothing waits for the image, so the card appears immediately and the image pops in when it loads:
2899
2899
2900
2900
<Sandpack>
2901
2901
@@ -2962,7 +2962,7 @@ export default function VanillaProfile() {
A Suspense boundary can wait for data, stylesheets, fonts, and images at once. Waiting for fonts and images only happens during a [`<ViewTransition>`](/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 `<ViewTransition>` reveal then waits for the font and the image, so the card appears complete.
3028
3028
3029
-
For comparison, the plain DOM version loads the same data and shows every resource arriving on its own schedule:
3029
+
For comparison, the version without React loads the same data and shows every resource arriving on its own schedule:
3030
3030
3031
3031
<Sandpack>
3032
3032
@@ -3126,7 +3126,7 @@ export default function VanillaProfileCard() {
0 commit comments