@@ -206,8 +206,7 @@ and check out the new behavior:
206
206
<Sandpack >
207
207
208
208
``` js src/App.js active
209
- import { useState } from ' react' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity;
210
-
209
+ import { Activity , useState } from ' react' ;
211
210
import Sidebar from ' ./Sidebar.js' ;
212
211
213
212
export default function App () {
@@ -426,7 +425,7 @@ If we switch to using an Activity boundary to show and hide the active tab, we c
426
425
<Sandpack >
427
426
428
427
``` js src/App.js active
429
- import { useState } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
428
+ import { useState , Activity } from ' react' ;
430
429
import TabButton from ' ./TabButton.js' ;
431
430
import Home from ' ./Home.js' ;
432
431
import Contact from ' ./Contact.js' ;
@@ -704,7 +703,7 @@ Try clicking the Posts tab now:
704
703
<Sandpack >
705
704
706
705
``` js src/App.js
707
- import { useState , Suspense } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
706
+ import { useState , Suspense , Activity } from ' react' ;
708
707
import TabButton from ' ./TabButton.js' ;
709
708
import Home from ' ./Home.js' ;
710
709
import Posts from ' ./Posts.js' ;
@@ -1128,7 +1127,7 @@ Let's update `App` to hide the inactive tab with a hidden Activity boundary inst
1128
1127
<Sandpack >
1129
1128
1130
1129
``` js src/App.js active
1131
- import { useState } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
1130
+ import { useState , Activity } from ' react' ;
1132
1131
import TabButton from ' ./TabButton.js' ;
1133
1132
import Home from ' ./Home.js' ;
1134
1133
import Video from ' ./Video.js' ;
@@ -1262,7 +1261,7 @@ Let's see the new behavior. Try playing the video, switching to the Home tab, th
1262
1261
<Sandpack >
1263
1262
1264
1263
``` js src/App.js active
1265
- import { useState } from ' react ' ; import { unstable_Activity , Activity as ActivityStable } from ' react' ; let Activity = ActivityStable ?? unstable_Activity ;
1264
+ import { useState , Activity } from ' react' ;
1266
1265
import TabButton from ' ./TabButton.js' ;
1267
1266
import Home from ' ./Home.js' ;
1268
1267
import Video from ' ./Video.js' ;
0 commit comments