Skip to content

Commit 50887a9

Browse files
committed
Tune Suspense demo heights, data delay, and DOM comparison wording
1 parent 26906f2 commit 50887a9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/content/reference/react/Suspense.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,7 +2978,7 @@ export function freshImageUrl() {
29782978
29792979
```css
29802980
#root {
2981-
min-height: 440px;
2981+
min-height: 320px;
29822982
}
29832983
.card {
29842984
margin-top: 1em;
@@ -3025,7 +3025,7 @@ hr {
30253025
30263026
All of these waits work together. 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.
30273027
3028-
For comparison, the plain DOM version loads the same data and shows every resource arriving on its own schedule:
3028+
For comparison, the second button performs the same update with plain DOM, without React. It loads the same data first, and then each resource pops in as it arrives:
30293029
30303030
<Sandpack>
30313031
@@ -3155,7 +3155,7 @@ export function freshImageUrl() {
31553155
export async function fetchQuote() {
31563156
// Add a fake delay to make waiting noticeable.
31573157
await new Promise((resolve) => {
3158-
setTimeout(resolve, 2000);
3158+
setTimeout(resolve, 300);
31593159
});
31603160
return 'The best way to predict the future is to invent it.';
31613161
}

0 commit comments

Comments
 (0)