@@ -3490,42 +3490,45 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3490
3490
prepareToReadContext ( workInProgress , renderExpirationTime ) ;
3491
3491
fn = fn ( updateExpirationTime , unmaskedContext ) ;
3492
3492
workInProgress . effectTag |= 1 ;
3493
- "object" === typeof fn &&
3494
- null !== fn &&
3495
- "function" === typeof fn . render &&
3496
- void 0 === fn . $$typeof
3497
- ? ( ( unmaskedContext = workInProgress . type ) ,
3498
- ( workInProgress . tag = 2 ) ,
3499
- ( workInProgress . memoizedState =
3500
- null !== fn . state && void 0 !== fn . state ? fn . state : null ) ,
3501
- ( unmaskedContext = unmaskedContext . getDerivedStateFromProps ) ,
3502
- "function" === typeof unmaskedContext &&
3503
- applyDerivedStateFromProps (
3504
- workInProgress ,
3505
- unmaskedContext ,
3506
- updateExpirationTime
3507
- ) ,
3508
- ( updateExpirationTime = pushContextProvider ( workInProgress ) ) ,
3509
- ( fn . updater = classComponentUpdater ) ,
3510
- ( workInProgress . stateNode = fn ) ,
3511
- ( fn . _reactInternalFiber = workInProgress ) ,
3512
- mountClassInstance ( workInProgress , renderExpirationTime ) ,
3513
- ( current$$1 = finishClassComponent (
3514
- current$$1 ,
3493
+ if (
3494
+ "object" === typeof fn &&
3495
+ null !== fn &&
3496
+ "function" === typeof fn . render &&
3497
+ void 0 === fn . $$typeof
3498
+ ) {
3499
+ var Component = workInProgress . type ;
3500
+ workInProgress . tag = 2 ;
3501
+ unmaskedContext = pushContextProvider ( workInProgress ) ;
3502
+ workInProgress . memoizedState =
3503
+ null !== fn . state && void 0 !== fn . state ? fn . state : null ;
3504
+ Component = Component . getDerivedStateFromProps ;
3505
+ "function" === typeof Component &&
3506
+ applyDerivedStateFromProps (
3515
3507
workInProgress ,
3516
- ! 0 ,
3517
- updateExpirationTime ,
3518
- renderExpirationTime
3519
- ) ) )
3520
- : ( ( workInProgress . tag = 1 ) ,
3508
+ Component ,
3509
+ updateExpirationTime
3510
+ ) ;
3511
+ fn . updater = classComponentUpdater ;
3512
+ workInProgress . stateNode = fn ;
3513
+ fn . _reactInternalFiber = workInProgress ;
3514
+ mountClassInstance ( workInProgress , renderExpirationTime ) ;
3515
+ current$$1 = finishClassComponent (
3516
+ current$$1 ,
3517
+ workInProgress ,
3518
+ ! 0 ,
3519
+ unmaskedContext ,
3520
+ renderExpirationTime
3521
+ ) ;
3522
+ } else
3523
+ ( workInProgress . tag = 1 ) ,
3521
3524
reconcileChildren (
3522
3525
current$$1 ,
3523
3526
workInProgress ,
3524
3527
fn ,
3525
3528
renderExpirationTime
3526
3529
) ,
3527
3530
( workInProgress . memoizedProps = updateExpirationTime ) ,
3528
- ( current$$1 = workInProgress . child ) ) ;
3531
+ ( current$$1 = workInProgress . child ) ;
3529
3532
return current$$1 ;
3530
3533
case 1 :
3531
3534
return (
@@ -3548,10 +3551,9 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3548
3551
var props = workInProgress . pendingProps ,
3549
3552
ctor = workInProgress . type ;
3550
3553
fn = getUnmaskedContext ( workInProgress ) ;
3551
- var needsContext =
3554
+ unmaskedContext = ( Component =
3552
3555
2 === workInProgress . tag &&
3553
- null != workInProgress . type . contextTypes ;
3554
- unmaskedContext = needsContext
3556
+ null != workInProgress . type . contextTypes )
3555
3557
? getMaskedContext ( workInProgress , fn )
3556
3558
: emptyContextObject ;
3557
3559
props = new ctor ( props , unmaskedContext ) ;
@@ -3560,17 +3562,17 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3560
3562
props . updater = classComponentUpdater ;
3561
3563
workInProgress . stateNode = props ;
3562
3564
props . _reactInternalFiber = workInProgress ;
3563
- needsContext &&
3564
- ( ( needsContext = workInProgress . stateNode ) ,
3565
- ( needsContext . __reactInternalMemoizedUnmaskedChildContext = fn ) ,
3566
- ( needsContext . __reactInternalMemoizedMaskedChildContext = unmaskedContext ) ) ;
3565
+ Component &&
3566
+ ( ( Component = workInProgress . stateNode ) ,
3567
+ ( Component . __reactInternalMemoizedUnmaskedChildContext = fn ) ,
3568
+ ( Component . __reactInternalMemoizedMaskedChildContext = unmaskedContext ) ) ;
3567
3569
mountClassInstance ( workInProgress , renderExpirationTime ) ;
3568
3570
fn = ! 0 ;
3569
3571
} else {
3570
3572
var ctor$jscomp$0 = workInProgress . type ;
3571
3573
unmaskedContext = workInProgress . stateNode ;
3572
3574
props = workInProgress . memoizedProps ;
3573
- needsContext = workInProgress . pendingProps ;
3575
+ Component = workInProgress . pendingProps ;
3574
3576
unmaskedContext . props = props ;
3575
3577
var oldContext = unmaskedContext . context ;
3576
3578
ctor = getUnmaskedContext ( workInProgress ) ;
@@ -3583,11 +3585,11 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3583
3585
typeof unmaskedContext . UNSAFE_componentWillReceiveProps &&
3584
3586
"function" !==
3585
3587
typeof unmaskedContext . componentWillReceiveProps ) ||
3586
- ( ( props !== needsContext || oldContext !== ctor ) &&
3588
+ ( ( props !== Component || oldContext !== ctor ) &&
3587
3589
callComponentWillReceiveProps (
3588
3590
workInProgress ,
3589
3591
unmaskedContext ,
3590
- needsContext ,
3592
+ Component ,
3591
3593
ctor
3592
3594
) ) ;
3593
3595
hasForceUpdate = ! 1 ;
@@ -3598,12 +3600,12 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3598
3600
( processUpdateQueue (
3599
3601
workInProgress ,
3600
3602
updateQueue ,
3601
- needsContext ,
3603
+ Component ,
3602
3604
unmaskedContext ,
3603
3605
renderExpirationTime
3604
3606
) ,
3605
3607
( oldContext = workInProgress . memoizedState ) ) ;
3606
- props !== needsContext ||
3608
+ props !== Component ||
3607
3609
oldState !== oldContext ||
3608
3610
didPerformWorkStackCursor . current ||
3609
3611
fn ||
@@ -3612,7 +3614,7 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3612
3614
( applyDerivedStateFromProps (
3613
3615
workInProgress ,
3614
3616
getDerivedStateFromProps ,
3615
- needsContext
3617
+ Component
3616
3618
) ,
3617
3619
( oldContext = workInProgress . memoizedState ) ) ,
3618
3620
( fn =
@@ -3621,7 +3623,7 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3621
3623
checkShouldComponentUpdate (
3622
3624
workInProgress ,
3623
3625
props ,
3624
- needsContext ,
3626
+ Component ,
3625
3627
oldState ,
3626
3628
oldContext ,
3627
3629
ctor
@@ -3640,9 +3642,9 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3640
3642
( workInProgress . effectTag |= 4 ) )
3641
3643
: ( "function" === typeof unmaskedContext . componentDidMount &&
3642
3644
( workInProgress . effectTag |= 4 ) ,
3643
- ( workInProgress . memoizedProps = needsContext ) ,
3645
+ ( workInProgress . memoizedProps = Component ) ,
3644
3646
( workInProgress . memoizedState = oldContext ) ) ,
3645
- ( unmaskedContext . props = needsContext ) ,
3647
+ ( unmaskedContext . props = Component ) ,
3646
3648
( unmaskedContext . state = oldContext ) ,
3647
3649
( unmaskedContext . context = ctor ) )
3648
3650
: ( "function" === typeof unmaskedContext . componentDidMount &&
@@ -3652,9 +3654,9 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3652
3654
else
3653
3655
( ctor$jscomp$0 = workInProgress . type ) ,
3654
3656
( unmaskedContext = workInProgress . stateNode ) ,
3655
- ( needsContext = workInProgress . memoizedProps ) ,
3657
+ ( Component = workInProgress . memoizedProps ) ,
3656
3658
( props = workInProgress . pendingProps ) ,
3657
- ( unmaskedContext . props = needsContext ) ,
3659
+ ( unmaskedContext . props = Component ) ,
3658
3660
( oldContext = unmaskedContext . context ) ,
3659
3661
( ctor = getUnmaskedContext ( workInProgress ) ) ,
3660
3662
( ctor = getMaskedContext ( workInProgress , ctor ) ) ,
@@ -3666,7 +3668,7 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3666
3668
typeof unmaskedContext . UNSAFE_componentWillReceiveProps &&
3667
3669
"function" !==
3668
3670
typeof unmaskedContext . componentWillReceiveProps ) ||
3669
- ( ( needsContext !== props || oldContext !== ctor ) &&
3671
+ ( ( Component !== props || oldContext !== ctor ) &&
3670
3672
callComponentWillReceiveProps (
3671
3673
workInProgress ,
3672
3674
unmaskedContext ,
@@ -3686,7 +3688,7 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3686
3688
renderExpirationTime
3687
3689
) ,
3688
3690
( oldState = workInProgress . memoizedState ) ) ,
3689
- needsContext !== props ||
3691
+ Component !== props ||
3690
3692
oldContext !== oldState ||
3691
3693
didPerformWorkStackCursor . current ||
3692
3694
fn ||
@@ -3703,7 +3705,7 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3703
3705
fn ||
3704
3706
checkShouldComponentUpdate (
3705
3707
workInProgress ,
3706
- needsContext ,
3708
+ Component ,
3707
3709
props ,
3708
3710
oldContext ,
3709
3711
oldState ,
@@ -3734,12 +3736,12 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3734
3736
typeof unmaskedContext . getSnapshotBeforeUpdate &&
3735
3737
( workInProgress . effectTag |= 256 ) )
3736
3738
: ( "function" !== typeof unmaskedContext . componentDidUpdate ||
3737
- ( needsContext === current$$1 . memoizedProps &&
3739
+ ( Component === current$$1 . memoizedProps &&
3738
3740
oldContext === current$$1 . memoizedState ) ||
3739
3741
( workInProgress . effectTag |= 4 ) ,
3740
3742
"function" !==
3741
3743
typeof unmaskedContext . getSnapshotBeforeUpdate ||
3742
- ( needsContext === current$$1 . memoizedProps &&
3744
+ ( Component === current$$1 . memoizedProps &&
3743
3745
oldContext === current$$1 . memoizedState ) ||
3744
3746
( workInProgress . effectTag |= 256 ) ,
3745
3747
( workInProgress . memoizedProps = props ) ,
@@ -3748,11 +3750,11 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3748
3750
( unmaskedContext . state = oldState ) ,
3749
3751
( unmaskedContext . context = ctor ) )
3750
3752
: ( "function" !== typeof unmaskedContext . componentDidUpdate ||
3751
- ( needsContext === current$$1 . memoizedProps &&
3753
+ ( Component === current$$1 . memoizedProps &&
3752
3754
oldContext === current$$1 . memoizedState ) ||
3753
3755
( workInProgress . effectTag |= 4 ) ,
3754
3756
"function" !== typeof unmaskedContext . getSnapshotBeforeUpdate ||
3755
- ( needsContext === current$$1 . memoizedProps &&
3757
+ ( Component === current$$1 . memoizedProps &&
3756
3758
oldContext === current$$1 . memoizedState ) ||
3757
3759
( workInProgress . effectTag |= 256 ) ,
3758
3760
( fn = ! 1 ) ) ;
@@ -3904,9 +3906,9 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3904
3906
updateExpirationTime = workInProgress . type . _context ;
3905
3907
fn = workInProgress . pendingProps ;
3906
3908
unmaskedContext = workInProgress . memoizedProps ;
3907
- needsContext = fn . value ;
3909
+ Component = fn . value ;
3908
3910
workInProgress . memoizedProps = fn ;
3909
- if ( null === unmaskedContext ) needsContext = 1073741823 ;
3911
+ if ( null === unmaskedContext ) Component = 1073741823 ;
3910
3912
else if ( unmaskedContext . value === fn . value ) {
3911
3913
if (
3912
3914
unmaskedContext . children === fn . children &&
@@ -3921,12 +3923,12 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3921
3923
) ;
3922
3924
break a;
3923
3925
}
3924
- needsContext = 0 ;
3926
+ Component = 0 ;
3925
3927
} else if (
3926
3928
( ( props = unmaskedContext . value ) ,
3927
- ( props === needsContext &&
3928
- ( 0 !== props || 1 / props === 1 / needsContext ) ) ||
3929
- ( props !== props && needsContext !== needsContext ) )
3929
+ ( props === Component &&
3930
+ ( 0 !== props || 1 / props === 1 / Component ) ) ||
3931
+ ( props !== props && Component !== Component ) )
3930
3932
) {
3931
3933
if (
3932
3934
unmaskedContext . children === fn . children &&
@@ -3941,14 +3943,14 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3941
3943
) ;
3942
3944
break a;
3943
3945
}
3944
- needsContext = 0 ;
3946
+ Component = 0 ;
3945
3947
} else if (
3946
- ( ( needsContext =
3948
+ ( ( Component =
3947
3949
"function" === typeof updateExpirationTime . _calculateChangedBits
3948
- ? updateExpirationTime . _calculateChangedBits ( props , needsContext )
3950
+ ? updateExpirationTime . _calculateChangedBits ( props , Component )
3949
3951
: 1073741823 ) ,
3950
- ( needsContext |= 0 ) ,
3951
- 0 === needsContext )
3952
+ ( Component |= 0 ) ,
3953
+ 0 === Component )
3952
3954
) {
3953
3955
if (
3954
3956
unmaskedContext . children === fn . children &&
@@ -3967,10 +3969,10 @@ function beginWork(current$$1, workInProgress, renderExpirationTime) {
3967
3969
propagateContextChange (
3968
3970
workInProgress ,
3969
3971
updateExpirationTime ,
3970
- needsContext ,
3972
+ Component ,
3971
3973
renderExpirationTime
3972
3974
) ;
3973
- workInProgress . stateNode = needsContext ;
3975
+ workInProgress . stateNode = Component ;
3974
3976
pushProvider ( workInProgress ) ;
3975
3977
reconcileChildren (
3976
3978
current$$1 ,
0 commit comments