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
{{ message }}
Repository navigation
Commit e42b9a7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/content/reference/react/Activity.md
+1-105Lines changed: 1 addition & 105 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -513,107 +513,7 @@ An Activity boundary can also prepare content before the user sees it. Content i
513
513
514
514
If `Posts` suspends while reading code or data, React continues rendering the rest of the page while the hidden work proceeds.
515
515
516
-
The following examples compare rendering the Posts tab on demand with pre-rendering it in a hidden Activity boundary. Both versions read the same cached Promise with [`use`](/reference/react/use).
517
-
518
-
<RecipestitleText="The difference between rendering and pre-rendering a tab"titleId="examples-pre-rendering">
519
-
520
-
#### Rendering the tab on demand shows a fallback {/*rendering-the-tab-on-demand-shows-a-fallback*/}
521
-
522
-
This version does not mount `<Posts>` until its tab is active. Select **Posts** to see the Suspense fallback while the data loads.
#### Pre-rendering the tab can avoid the fallback {/*pre-rendering-the-tab-can-avoid-the-fallback*/}
615
-
616
-
This version renders both tabs inside Activity boundaries. React begins rendering `<Posts>` while its boundary is hidden. Wait briefly before selecting **Posts**. The list appears immediately because the hidden render started loading it in the background.
516
+
The following example renders both tabs inside Activity boundaries. `<Posts>` reads a cached Promise with [`use`](/reference/react/use), so React begins loading the posts while its boundary is hidden. Wait briefly before selecting **Posts**. If the hidden render has finished, the list appears immediately.
617
517
618
518
<Sandpack>
619
519
@@ -707,10 +607,6 @@ button {
707
607
708
608
</Sandpack>
709
609
710
-
<Solution />
711
-
712
-
</Recipes>
713
-
714
610
If the user selects Posts before the hidden render finishes, the Suspense fallback appears until the data is ready. Pre-rendering can reduce the loading time, but it does not guarantee that the content will always be ready.
0 commit comments