@@ -255,7 +255,6 @@ if (supportsMutation) {
255
255
workInProgress : Fiber ,
256
256
type : Type ,
257
257
newProps : Props ,
258
- rootContainerInstance : Container ,
259
258
) {
260
259
// If we have an alternate, that means this is an update and we need to
261
260
// schedule a side-effect to do the updates.
@@ -280,7 +279,6 @@ if (supportsMutation) {
280
279
type ,
281
280
oldProps ,
282
281
newProps ,
283
- rootContainerInstance ,
284
282
currentHostContext ,
285
283
) ;
286
284
// TODO: Type this specific to this type of component.
@@ -458,7 +456,6 @@ if (supportsMutation) {
458
456
workInProgress : Fiber ,
459
457
type : Type ,
460
458
newProps : Props ,
461
- rootContainerInstance : Container ,
462
459
) {
463
460
const currentInstance = current . stateNode ;
464
461
const oldProps = current . memoizedProps ;
@@ -480,7 +477,6 @@ if (supportsMutation) {
480
477
type ,
481
478
oldProps ,
482
479
newProps ,
483
- rootContainerInstance ,
484
480
currentHostContext ,
485
481
) ;
486
482
}
@@ -501,13 +497,7 @@ if (supportsMutation) {
501
497
recyclableInstance ,
502
498
) ;
503
499
if (
504
- finalizeInitialChildren (
505
- newInstance ,
506
- type ,
507
- newProps ,
508
- rootContainerInstance ,
509
- currentHostContext ,
510
- )
500
+ finalizeInitialChildren ( newInstance , type , newProps , currentHostContext )
511
501
) {
512
502
markUpdate ( workInProgress ) ;
513
503
}
@@ -555,7 +545,6 @@ if (supportsMutation) {
555
545
workInProgress : Fiber ,
556
546
type : Type ,
557
547
newProps : Props ,
558
- rootContainerInstance : Container ,
559
548
) {
560
549
// Noop
561
550
} ;
@@ -964,16 +953,9 @@ function completeWork(
964
953
}
965
954
case HostComponent : {
966
955
popHostContext ( workInProgress ) ;
967
- const rootContainerInstance = getRootHostContainer ( ) ;
968
956
const type = workInProgress . type ;
969
957
if ( current !== null && workInProgress . stateNode != null ) {
970
- updateHostComponent (
971
- current ,
972
- workInProgress ,
973
- type ,
974
- newProps ,
975
- rootContainerInstance ,
976
- ) ;
958
+ updateHostComponent ( current , workInProgress , type , newProps ) ;
977
959
978
960
if ( current . ref !== workInProgress . ref ) {
979
961
markRef ( workInProgress ) ;
@@ -1002,17 +984,14 @@ function completeWork(
1002
984
// TODO: Move this and createInstance step into the beginPhase
1003
985
// to consolidate.
1004
986
if (
1005
- prepareToHydrateHostInstance (
1006
- workInProgress ,
1007
- rootContainerInstance ,
1008
- currentHostContext ,
1009
- )
987
+ prepareToHydrateHostInstance ( workInProgress , currentHostContext )
1010
988
) {
1011
989
// If changes to the hydrated node need to be applied at the
1012
990
// commit-phase we mark this as such.
1013
991
markUpdate ( workInProgress ) ;
1014
992
}
1015
993
} else {
994
+ const rootContainerInstance = getRootHostContainer ( ) ;
1016
995
const instance = createInstance (
1017
996
type ,
1018
997
newProps ,
@@ -1033,7 +1012,6 @@ function completeWork(
1033
1012
instance ,
1034
1013
type ,
1035
1014
newProps ,
1036
- rootContainerInstance ,
1037
1015
currentHostContext ,
1038
1016
)
1039
1017
) {
0 commit comments