@@ -277,6 +277,7 @@ function forceUnmountCurrentAndReconcile(
277
277
}
278
278
279
279
function updateForwardRef (
280
+ root : FiberRoot ,
280
281
current : Fiber | null ,
281
282
workInProgress : Fiber ,
282
283
Component : any ,
@@ -316,6 +317,7 @@ function updateForwardRef(
316
317
nextChildren = renderWithHooks (
317
318
current ,
318
319
workInProgress ,
320
+ root ,
319
321
render ,
320
322
nextProps ,
321
323
ref ,
@@ -330,6 +332,7 @@ function updateForwardRef(
330
332
nextChildren = renderWithHooks (
331
333
current ,
332
334
workInProgress ,
335
+ root ,
333
336
render ,
334
337
nextProps ,
335
338
ref ,
@@ -342,6 +345,7 @@ function updateForwardRef(
342
345
nextChildren = renderWithHooks (
343
346
current ,
344
347
workInProgress ,
348
+ root ,
345
349
render ,
346
350
nextProps ,
347
351
ref ,
@@ -370,6 +374,7 @@ function updateForwardRef(
370
374
}
371
375
372
376
function updateMemoComponent (
377
+ root : FiberRoot ,
373
378
current : Fiber | null ,
374
379
workInProgress : Fiber ,
375
380
Component : any ,
@@ -398,6 +403,7 @@ function updateMemoComponent(
398
403
validateFunctionComponentInDev ( workInProgress , type ) ;
399
404
}
400
405
return updateSimpleMemoComponent (
406
+ root ,
401
407
current ,
402
408
workInProgress ,
403
409
resolvedType ,
@@ -478,6 +484,7 @@ function updateMemoComponent(
478
484
}
479
485
480
486
function updateSimpleMemoComponent (
487
+ root : FiberRoot ,
481
488
current : Fiber | null ,
482
489
workInProgress : Fiber ,
483
490
Component : any ,
@@ -532,6 +539,7 @@ function updateSimpleMemoComponent(
532
539
}
533
540
}
534
541
return updateFunctionComponent (
542
+ root ,
535
543
current ,
536
544
workInProgress ,
537
545
Component ,
@@ -601,6 +609,7 @@ function markRef(current: Fiber | null, workInProgress: Fiber) {
601
609
}
602
610
603
611
function updateFunctionComponent (
612
+ root ,
604
613
current ,
605
614
workInProgress ,
606
615
Component ,
@@ -638,6 +647,7 @@ function updateFunctionComponent(
638
647
nextChildren = renderWithHooks (
639
648
current ,
640
649
workInProgress ,
650
+ root ,
641
651
Component ,
642
652
nextProps ,
643
653
context ,
@@ -652,6 +662,7 @@ function updateFunctionComponent(
652
662
nextChildren = renderWithHooks (
653
663
current ,
654
664
workInProgress ,
665
+ root ,
655
666
Component ,
656
667
nextProps ,
657
668
context ,
@@ -664,6 +675,7 @@ function updateFunctionComponent(
664
675
nextChildren = renderWithHooks (
665
676
current ,
666
677
workInProgress ,
678
+ root ,
667
679
Component ,
668
680
nextProps ,
669
681
context ,
@@ -692,6 +704,7 @@ function updateFunctionComponent(
692
704
}
693
705
694
706
function updateChunk (
707
+ root : FiberRoot ,
695
708
current : Fiber | null ,
696
709
workInProgress : Fiber ,
697
710
chunk : any ,
@@ -714,6 +727,7 @@ function updateChunk(
714
727
nextChildren = renderWithHooks (
715
728
current ,
716
729
workInProgress ,
730
+ root ,
717
731
render ,
718
732
nextProps ,
719
733
data ,
@@ -728,6 +742,7 @@ function updateChunk(
728
742
nextChildren = renderWithHooks (
729
743
current ,
730
744
workInProgress ,
745
+ root ,
731
746
render ,
732
747
nextProps ,
733
748
data ,
@@ -740,6 +755,7 @@ function updateChunk(
740
755
nextChildren = renderWithHooks (
741
756
current ,
742
757
workInProgress ,
758
+ root ,
743
759
render ,
744
760
nextProps ,
745
761
data ,
@@ -1110,6 +1126,7 @@ function updateHostText(current, workInProgress) {
1110
1126
}
1111
1127
1112
1128
function mountLazyComponent (
1129
+ root ,
1113
1130
_current ,
1114
1131
workInProgress ,
1115
1132
elementType ,
@@ -1147,6 +1164,7 @@ function mountLazyComponent(
1147
1164
) ;
1148
1165
}
1149
1166
child = updateFunctionComponent (
1167
+ root ,
1150
1168
null ,
1151
1169
workInProgress ,
1152
1170
Component ,
@@ -1177,6 +1195,7 @@ function mountLazyComponent(
1177
1195
) ;
1178
1196
}
1179
1197
child = updateForwardRef (
1198
+ root ,
1180
1199
null ,
1181
1200
workInProgress ,
1182
1201
Component ,
@@ -1201,6 +1220,7 @@ function mountLazyComponent(
1201
1220
}
1202
1221
}
1203
1222
child = updateMemoComponent (
1223
+ root ,
1204
1224
null ,
1205
1225
workInProgress ,
1206
1226
Component ,
@@ -1214,6 +1234,7 @@ function mountLazyComponent(
1214
1234
if ( enableChunksAPI ) {
1215
1235
// TODO: Resolve for Hot Reloading.
1216
1236
child = updateChunk (
1237
+ root ,
1217
1238
null ,
1218
1239
workInProgress ,
1219
1240
Component ,
@@ -1306,6 +1327,7 @@ function mountIncompleteClassComponent(
1306
1327
}
1307
1328
1308
1329
function mountIndeterminateComponent (
1330
+ root ,
1309
1331
_current ,
1310
1332
workInProgress ,
1311
1333
Component ,
@@ -1362,6 +1384,7 @@ function mountIndeterminateComponent(
1362
1384
value = renderWithHooks (
1363
1385
null ,
1364
1386
workInProgress ,
1387
+ root ,
1365
1388
Component ,
1366
1389
props ,
1367
1390
context ,
@@ -1371,6 +1394,7 @@ function mountIndeterminateComponent(
1371
1394
value = renderWithHooks (
1372
1395
null ,
1373
1396
workInProgress ,
1397
+ root ,
1374
1398
Component ,
1375
1399
props ,
1376
1400
context ,
@@ -1467,6 +1491,7 @@ function mountIndeterminateComponent(
1467
1491
value = renderWithHooks (
1468
1492
null ,
1469
1493
workInProgress ,
1494
+ root ,
1470
1495
Component ,
1471
1496
props ,
1472
1497
context ,
@@ -2886,6 +2911,7 @@ function remountFiber(
2886
2911
}
2887
2912
2888
2913
function beginWork (
2914
+ root : FiberRoot ,
2889
2915
current : Fiber | null ,
2890
2916
workInProgress : Fiber ,
2891
2917
renderExpirationTime : ExpirationTime ,
@@ -3109,6 +3135,7 @@ function beginWork(
3109
3135
switch ( workInProgress . tag ) {
3110
3136
case IndeterminateComponent : {
3111
3137
return mountIndeterminateComponent (
3138
+ root ,
3112
3139
current ,
3113
3140
workInProgress ,
3114
3141
workInProgress . type ,
@@ -3118,6 +3145,7 @@ function beginWork(
3118
3145
case LazyComponent : {
3119
3146
const elementType = workInProgress . elementType ;
3120
3147
return mountLazyComponent (
3148
+ root ,
3121
3149
current ,
3122
3150
workInProgress ,
3123
3151
elementType ,
@@ -3133,6 +3161,7 @@ function beginWork(
3133
3161
? unresolvedProps
3134
3162
: resolveDefaultProps ( Component , unresolvedProps ) ;
3135
3163
return updateFunctionComponent (
3164
+ root ,
3136
3165
current ,
3137
3166
workInProgress ,
3138
3167
Component ,
@@ -3181,6 +3210,7 @@ function beginWork(
3181
3210
? unresolvedProps
3182
3211
: resolveDefaultProps ( type , unresolvedProps ) ;
3183
3212
return updateForwardRef (
3213
+ root ,
3184
3214
current ,
3185
3215
workInProgress ,
3186
3216
type ,
@@ -3227,6 +3257,7 @@ function beginWork(
3227
3257
}
3228
3258
resolvedProps = resolveDefaultProps ( type . type , resolvedProps ) ;
3229
3259
return updateMemoComponent (
3260
+ root ,
3230
3261
current ,
3231
3262
workInProgress ,
3232
3263
type ,
@@ -3237,6 +3268,7 @@ function beginWork(
3237
3268
}
3238
3269
case SimpleMemoComponent : {
3239
3270
return updateSimpleMemoComponent (
3271
+ root ,
3240
3272
current ,
3241
3273
workInProgress ,
3242
3274
workInProgress . type ,
@@ -3292,6 +3324,7 @@ function beginWork(
3292
3324
const chunk = workInProgress . type ;
3293
3325
const props = workInProgress . pendingProps ;
3294
3326
return updateChunk (
3327
+ root ,
3295
3328
current ,
3296
3329
workInProgress ,
3297
3330
chunk ,
0 commit comments