@@ -246,9 +246,9 @@ describe('StoreStressConcurrent', () => {
246246 // 1. Capture the expected render result.
247247 const snapshots = [ ] ;
248248 let container = document . createElement ( 'div' ) ;
249- // $FlowFixMe
250- let root = ReactDOM . createRoot ( container ) ;
251249 for ( let i = 0 ; i < steps . length ; i ++ ) {
250+ // $FlowFixMe
251+ const root = ReactDOM . createRoot ( container ) ;
252252 act ( ( ) => root . render ( < Root > { steps [ i ] } </ Root > ) ) ;
253253 // We snapshot each step once so it doesn't regress.
254254 snapshots . push ( print ( store ) ) ;
@@ -320,7 +320,7 @@ describe('StoreStressConcurrent', () => {
320320 for ( let j = 0 ; j < steps . length ; j ++ ) {
321321 container = document . createElement ( 'div' ) ;
322322 // $FlowFixMe
323- root = ReactDOM . createRoot ( container ) ;
323+ const root = ReactDOM . createRoot ( container ) ;
324324 act ( ( ) => root . render ( < Root > { steps [ i ] } </ Root > ) ) ;
325325 expect ( print ( store ) ) . toMatch ( snapshots [ i ] ) ;
326326 act ( ( ) => root . render ( < Root > { steps [ j ] } </ Root > ) ) ;
@@ -337,7 +337,7 @@ describe('StoreStressConcurrent', () => {
337337 for ( let j = 0 ; j < steps . length ; j ++ ) {
338338 container = document . createElement ( 'div' ) ;
339339 // $FlowFixMe
340- root = ReactDOM . createRoot ( container ) ;
340+ const root = ReactDOM . createRoot ( container ) ;
341341 act ( ( ) =>
342342 root . render (
343343 < Root >
@@ -408,9 +408,9 @@ describe('StoreStressConcurrent', () => {
408408 // This is the only step where we use Jest snapshots.
409409 const snapshots = [ ] ;
410410 let container = document . createElement ( 'div' ) ;
411- // $FlowFixMe
412- let root = ReactDOM . createRoot ( container ) ;
413411 for ( let i = 0 ; i < steps . length ; i ++ ) {
412+ // $FlowFixMe
413+ const root = ReactDOM . createRoot ( container ) ;
414414 act ( ( ) =>
415415 root . render (
416416 < Root >
@@ -512,6 +512,8 @@ describe('StoreStressConcurrent', () => {
512512
513513 // 2. Verify check Suspense can render same steps as initial fallback content.
514514 for ( let i = 0 ; i < steps . length ; i ++ ) {
515+ // $FlowFixMe
516+ const root = ReactDOM . createRoot ( container ) ;
515517 act ( ( ) =>
516518 root . render (
517519 < Root >
@@ -536,7 +538,7 @@ describe('StoreStressConcurrent', () => {
536538 // Always start with a fresh container and steps[i].
537539 container = document . createElement ( 'div' ) ;
538540 // $FlowFixMe
539- root = ReactDOM . createRoot ( container ) ;
541+ const root = ReactDOM . createRoot ( container ) ;
540542 act ( ( ) =>
541543 root . render (
542544 < Root >
@@ -582,7 +584,7 @@ describe('StoreStressConcurrent', () => {
582584 // Always start with a fresh container and steps[i].
583585 container = document . createElement ( 'div' ) ;
584586 // $FlowFixMe
585- root = ReactDOM . createRoot ( container ) ;
587+ const root = ReactDOM . createRoot ( container ) ;
586588 act ( ( ) =>
587589 root . render (
588590 < Root >
@@ -640,7 +642,7 @@ describe('StoreStressConcurrent', () => {
640642 // Always start with a fresh container and steps[i].
641643 container = document . createElement ( 'div' ) ;
642644 // $FlowFixMe
643- root = ReactDOM . createRoot ( container ) ;
645+ const root = ReactDOM . createRoot ( container ) ;
644646 act ( ( ) =>
645647 root . render (
646648 < Root >
@@ -690,7 +692,7 @@ describe('StoreStressConcurrent', () => {
690692 // Always start with a fresh container and steps[i].
691693 container = document . createElement ( 'div' ) ;
692694 // $FlowFixMe
693- root = ReactDOM . createRoot ( container ) ;
695+ const root = ReactDOM . createRoot ( container ) ;
694696 act ( ( ) =>
695697 root . render (
696698 < Root >
@@ -744,7 +746,7 @@ describe('StoreStressConcurrent', () => {
744746 // Always start with a fresh container and steps[i].
745747 container = document . createElement ( 'div' ) ;
746748 // $FlowFixMe
747- root = ReactDOM . createRoot ( container ) ;
749+ const root = ReactDOM . createRoot ( container ) ;
748750 act ( ( ) =>
749751 root . render (
750752 < Root >
@@ -897,9 +899,9 @@ describe('StoreStressConcurrent', () => {
897899 // This is the only step where we use Jest snapshots.
898900 const snapshots = [ ] ;
899901 let container = document . createElement ( 'div' ) ;
900- // $FlowFixMe
901- let root = ReactDOM . createRoot ( container ) ;
902902 for ( let i = 0 ; i < steps . length ; i ++ ) {
903+ // $FlowFixMe
904+ const root = ReactDOM . createRoot ( container ) ;
903905 act ( ( ) =>
904906 root . render (
905907 < Root >
@@ -922,6 +924,8 @@ describe('StoreStressConcurrent', () => {
922924 // which is different from the snapshots above. So we take more snapshots.
923925 const fallbackSnapshots = [ ] ;
924926 for ( let i = 0 ; i < steps . length ; i ++ ) {
927+ // $FlowFixMe
928+ const root = ReactDOM . createRoot ( container ) ;
925929 act ( ( ) =>
926930 root . render (
927931 < Root >
@@ -1055,7 +1059,7 @@ describe('StoreStressConcurrent', () => {
10551059 // Always start with a fresh container and steps[i].
10561060 container = document . createElement ( 'div' ) ;
10571061 // $FlowFixMe
1058- root = ReactDOM . createRoot ( container ) ;
1062+ const root = ReactDOM . createRoot ( container ) ;
10591063 act ( ( ) =>
10601064 root . render (
10611065 < Root >
@@ -1107,7 +1111,7 @@ describe('StoreStressConcurrent', () => {
11071111 // Always start with a fresh container and steps[i].
11081112 container = document . createElement ( 'div' ) ;
11091113 // $FlowFixMe
1110- root = ReactDOM . createRoot ( container ) ;
1114+ const root = ReactDOM . createRoot ( container ) ;
11111115 act ( ( ) =>
11121116 root . render (
11131117 < Root >
@@ -1174,7 +1178,7 @@ describe('StoreStressConcurrent', () => {
11741178 // Always start with a fresh container and steps[i].
11751179 container = document . createElement ( 'div' ) ;
11761180 // $FlowFixMe
1177- root = ReactDOM . createRoot ( container ) ;
1181+ const root = ReactDOM . createRoot ( container ) ;
11781182 act ( ( ) =>
11791183 root . render (
11801184 < Root >
@@ -1226,7 +1230,7 @@ describe('StoreStressConcurrent', () => {
12261230 // Always start with a fresh container and steps[i].
12271231 container = document . createElement ( 'div' ) ;
12281232 // $FlowFixMe
1229- root = ReactDOM . createRoot ( container ) ;
1233+ const root = ReactDOM . createRoot ( container ) ;
12301234 act ( ( ) =>
12311235 root . render (
12321236 < Root >
@@ -1278,7 +1282,7 @@ describe('StoreStressConcurrent', () => {
12781282 // Always start with a fresh container and steps[i].
12791283 container = document . createElement ( 'div' ) ;
12801284 // $FlowFixMe
1281- root = ReactDOM . createRoot ( container ) ;
1285+ const root = ReactDOM . createRoot ( container ) ;
12821286 act ( ( ) =>
12831287 root . render (
12841288 < Root >
0 commit comments