@@ -206,7 +206,8 @@ and check out the new behavior:
206206<Sandpack >
207207
208208``` js src/App.js active
209- import { Activity , useState } from ' react' ;
209+ import { useState } from ' react' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity;
210+
210211import Sidebar from ' ./Sidebar.js' ;
211212
212213export default function App () {
@@ -425,7 +426,7 @@ If we switch to using an Activity boundary to show and hide the active tab, we c
425426<Sandpack>
426427
427428` ` ` js src/ App .js active
428- import { useState , Activity } from ' react' ;
429+ import { useState } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
429430import TabButton from ' ./TabButton.js' ;
430431import Home from ' ./Home.js' ;
431432import Contact from ' ./Contact.js' ;
@@ -703,7 +704,7 @@ Try clicking the Posts tab now:
703704<Sandpack>
704705
705706` ` ` js src/ App .js
706- import { useState , Suspense , Activity } from ' react' ;
707+ import { useState , Suspense } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
707708import TabButton from ' ./TabButton.js' ;
708709import Home from ' ./Home.js' ;
709710import Posts from ' ./Posts.js' ;
@@ -1127,7 +1128,7 @@ Let's update `App` to hide the inactive tab with a hidden Activity boundary inst
11271128<Sandpack>
11281129
11291130` ` ` js src/ App .js active
1130- import { useState , Activity } from ' react' ;
1131+ import { useState } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
11311132import TabButton from ' ./TabButton.js' ;
11321133import Home from ' ./Home.js' ;
11331134import Video from ' ./Video.js' ;
@@ -1261,7 +1262,7 @@ Let's see the new behavior. Try playing the video, switching to the Home tab, th
12611262<Sandpack>
12621263
12631264` ` ` js src/ App .js active
1264- import { useState , Activity } from ' react' ;
1265+ import { useState } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
12651266import TabButton from ' ./TabButton.js' ;
12661267import Home from ' ./Home.js' ;
12671268import Video from ' ./Video.js' ;
0 commit comments