@@ -255,7 +255,6 @@ if (supportsMutation) {
255255 workInProgress : Fiber ,
256256 type : Type ,
257257 newProps : Props ,
258- rootContainerInstance : Container ,
259258 ) {
260259 // If we have an alternate, that means this is an update and we need to
261260 // schedule a side-effect to do the updates.
@@ -280,7 +279,6 @@ if (supportsMutation) {
280279 type ,
281280 oldProps ,
282281 newProps ,
283- rootContainerInstance ,
284282 currentHostContext ,
285283 ) ;
286284 // TODO: Type this specific to this type of component.
@@ -458,7 +456,6 @@ if (supportsMutation) {
458456 workInProgress : Fiber ,
459457 type : Type ,
460458 newProps : Props ,
461- rootContainerInstance : Container ,
462459 ) {
463460 const currentInstance = current . stateNode ;
464461 const oldProps = current . memoizedProps ;
@@ -480,7 +477,6 @@ if (supportsMutation) {
480477 type ,
481478 oldProps ,
482479 newProps ,
483- rootContainerInstance ,
484480 currentHostContext ,
485481 ) ;
486482 }
@@ -501,13 +497,7 @@ if (supportsMutation) {
501497 recyclableInstance ,
502498 ) ;
503499 if (
504- finalizeInitialChildren (
505- newInstance ,
506- type ,
507- newProps ,
508- rootContainerInstance ,
509- currentHostContext ,
510- )
500+ finalizeInitialChildren ( newInstance , type , newProps , currentHostContext )
511501 ) {
512502 markUpdate ( workInProgress ) ;
513503 }
@@ -555,7 +545,6 @@ if (supportsMutation) {
555545 workInProgress : Fiber ,
556546 type : Type ,
557547 newProps : Props ,
558- rootContainerInstance : Container ,
559548 ) {
560549 // Noop
561550 } ;
@@ -964,16 +953,9 @@ function completeWork(
964953 }
965954 case HostComponent : {
966955 popHostContext ( workInProgress ) ;
967- const rootContainerInstance = getRootHostContainer ( ) ;
968956 const type = workInProgress . type ;
969957 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 ) ;
977959
978960 if ( current . ref !== workInProgress . ref ) {
979961 markRef ( workInProgress ) ;
@@ -1002,17 +984,14 @@ function completeWork(
1002984 // TODO: Move this and createInstance step into the beginPhase
1003985 // to consolidate.
1004986 if (
1005- prepareToHydrateHostInstance (
1006- workInProgress ,
1007- rootContainerInstance ,
1008- currentHostContext ,
1009- )
987+ prepareToHydrateHostInstance ( workInProgress , currentHostContext )
1010988 ) {
1011989 // If changes to the hydrated node need to be applied at the
1012990 // commit-phase we mark this as such.
1013991 markUpdate ( workInProgress ) ;
1014992 }
1015993 } else {
994+ const rootContainerInstance = getRootHostContainer ( ) ;
1016995 const instance = createInstance (
1017996 type ,
1018997 newProps ,
@@ -1033,7 +1012,6 @@ function completeWork(
10331012 instance ,
10341013 type ,
10351014 newProps ,
1036- rootContainerInstance ,
10371015 currentHostContext ,
10381016 )
10391017 ) {
0 commit comments