react-test-renderer 18.2.0-next-be229c565-20220613 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3570,13 +3570,7 @@ function enqueueConcurrentRenderForLane(fiber, lane) {
|
|
|
3570
3570
|
var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
|
|
3571
3571
|
|
|
3572
3572
|
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
3573
|
-
//
|
|
3574
|
-
// has already unmounted. This isn't really necessary but it happens to be the
|
|
3575
|
-
// current behavior we've used for several release cycles. Consider not
|
|
3576
|
-
// performing this check if the updated fiber already unmounted, since it's
|
|
3577
|
-
// not possible for that to cause an infinite update loop.
|
|
3578
|
-
throwIfInfiniteUpdateLoopDetected(); // Update the source fiber's lanes
|
|
3579
|
-
|
|
3573
|
+
// Update the source fiber's lanes
|
|
3580
3574
|
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
|
|
3581
3575
|
var alternate = sourceFiber.alternate;
|
|
3582
3576
|
|
|
@@ -4633,7 +4627,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
4633
4627
|
}
|
|
4634
4628
|
|
|
4635
4629
|
if (typeof instance.componentDidMount === 'function') {
|
|
4636
|
-
var fiberFlags = Update
|
|
4630
|
+
var fiberFlags = Update;
|
|
4637
4631
|
|
|
4638
4632
|
workInProgress.flags |= fiberFlags;
|
|
4639
4633
|
}
|
|
@@ -4677,7 +4671,7 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
4677
4671
|
// If an update was already in progress, we should schedule an Update
|
|
4678
4672
|
// effect even though we're bailing out, so that cWU/cDU are called.
|
|
4679
4673
|
if (typeof instance.componentDidMount === 'function') {
|
|
4680
|
-
var fiberFlags = Update
|
|
4674
|
+
var fiberFlags = Update;
|
|
4681
4675
|
|
|
4682
4676
|
workInProgress.flags |= fiberFlags;
|
|
4683
4677
|
}
|
|
@@ -4706,7 +4700,7 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
4706
4700
|
}
|
|
4707
4701
|
|
|
4708
4702
|
if (typeof instance.componentDidMount === 'function') {
|
|
4709
|
-
var _fiberFlags = Update
|
|
4703
|
+
var _fiberFlags = Update;
|
|
4710
4704
|
|
|
4711
4705
|
workInProgress.flags |= _fiberFlags;
|
|
4712
4706
|
}
|
|
@@ -4714,7 +4708,7 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
4714
4708
|
// If an update was already in progress, we should schedule an Update
|
|
4715
4709
|
// effect even though we're bailing out, so that cWU/cDU are called.
|
|
4716
4710
|
if (typeof instance.componentDidMount === 'function') {
|
|
4717
|
-
var _fiberFlags2 = Update
|
|
4711
|
+
var _fiberFlags2 = Update;
|
|
4718
4712
|
|
|
4719
4713
|
workInProgress.flags |= _fiberFlags2;
|
|
4720
4714
|
} // If shouldComponentUpdate returned false, we should still update the
|
|
@@ -7128,7 +7122,7 @@ function updateInsertionEffect(create, deps) {
|
|
|
7128
7122
|
}
|
|
7129
7123
|
|
|
7130
7124
|
function mountLayoutEffect(create, deps) {
|
|
7131
|
-
var fiberFlags = Update
|
|
7125
|
+
var fiberFlags = Update;
|
|
7132
7126
|
|
|
7133
7127
|
return mountEffectImpl(fiberFlags, Layout, create, deps);
|
|
7134
7128
|
}
|
|
@@ -7174,7 +7168,7 @@ function mountImperativeHandle(ref, create, deps) {
|
|
|
7174
7168
|
|
|
7175
7169
|
|
|
7176
7170
|
var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
|
|
7177
|
-
var fiberFlags = Update
|
|
7171
|
+
var fiberFlags = Update;
|
|
7178
7172
|
|
|
7179
7173
|
return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
|
|
7180
7174
|
}
|
|
@@ -9456,7 +9450,6 @@ function markRef(current, workInProgress) {
|
|
|
9456
9450
|
if (current === null && ref !== null || current !== null && current.ref !== ref) {
|
|
9457
9451
|
// Schedule a Ref effect
|
|
9458
9452
|
workInProgress.flags |= Ref;
|
|
9459
|
-
workInProgress.flags |= RefStatic;
|
|
9460
9453
|
}
|
|
9461
9454
|
}
|
|
9462
9455
|
|
|
@@ -11447,7 +11440,7 @@ function markUpdate(workInProgress) {
|
|
|
11447
11440
|
}
|
|
11448
11441
|
|
|
11449
11442
|
function markRef$1(workInProgress) {
|
|
11450
|
-
workInProgress.flags |= Ref
|
|
11443
|
+
workInProgress.flags |= Ref;
|
|
11451
11444
|
}
|
|
11452
11445
|
|
|
11453
11446
|
var appendAllChildren;
|
|
@@ -12455,10 +12448,6 @@ function unwindWork(current, workInProgress, renderLanes) {
|
|
|
12455
12448
|
|
|
12456
12449
|
return null;
|
|
12457
12450
|
|
|
12458
|
-
case TracingMarkerComponent:
|
|
12459
|
-
|
|
12460
|
-
return null;
|
|
12461
|
-
|
|
12462
12451
|
default:
|
|
12463
12452
|
return null;
|
|
12464
12453
|
}
|
|
@@ -12735,11 +12724,6 @@ var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
|
|
|
12735
12724
|
{
|
|
12736
12725
|
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
|
|
12737
12726
|
} // Used during the commit phase to track the state of the Offscreen component stack.
|
|
12738
|
-
// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
var offscreenSubtreeIsHidden = false;
|
|
12742
|
-
var offscreenSubtreeWasHidden = false;
|
|
12743
12727
|
var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
|
|
12744
12728
|
var nextEffect = null; // Used for Profiling builds to track updaters.
|
|
12745
12729
|
function reportUncaughtErrorInDEV(error) {
|
|
@@ -12773,15 +12757,6 @@ var callComponentWillUnmountWithTimer = function (current, instance) {
|
|
|
12773
12757
|
}; // Capture errors so they don't interrupt mounting.
|
|
12774
12758
|
|
|
12775
12759
|
|
|
12776
|
-
function safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {
|
|
12777
|
-
try {
|
|
12778
|
-
commitHookEffectListMount(Layout, current);
|
|
12779
|
-
} catch (error) {
|
|
12780
|
-
captureCommitPhaseError(current, nearestMountedAncestor, error);
|
|
12781
|
-
}
|
|
12782
|
-
} // Capture errors so they don't interrupt unmounting.
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
12760
|
function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {
|
|
12786
12761
|
try {
|
|
12787
12762
|
callComponentWillUnmountWithTimer(current, instance);
|
|
@@ -12790,24 +12765,6 @@ function safelyCallComponentWillUnmount(current, nearestMountedAncestor, instanc
|
|
|
12790
12765
|
}
|
|
12791
12766
|
} // Capture errors so they don't interrupt mounting.
|
|
12792
12767
|
|
|
12793
|
-
|
|
12794
|
-
function safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {
|
|
12795
|
-
try {
|
|
12796
|
-
instance.componentDidMount();
|
|
12797
|
-
} catch (error) {
|
|
12798
|
-
captureCommitPhaseError(current, nearestMountedAncestor, error);
|
|
12799
|
-
}
|
|
12800
|
-
} // Capture errors so they don't interrupt mounting.
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
function safelyAttachRef(current, nearestMountedAncestor) {
|
|
12804
|
-
try {
|
|
12805
|
-
commitAttachRef(current);
|
|
12806
|
-
} catch (error) {
|
|
12807
|
-
captureCommitPhaseError(current, nearestMountedAncestor, error);
|
|
12808
|
-
}
|
|
12809
|
-
}
|
|
12810
|
-
|
|
12811
12768
|
function safelyDetachRef(current, nearestMountedAncestor) {
|
|
12812
12769
|
var ref = current.ref;
|
|
12813
12770
|
|
|
@@ -13141,7 +13098,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe
|
|
|
13141
13098
|
case ForwardRef:
|
|
13142
13099
|
case SimpleMemoComponent:
|
|
13143
13100
|
{
|
|
13144
|
-
|
|
13101
|
+
{
|
|
13145
13102
|
// At this point layout effects have already been destroyed (during mutation phase).
|
|
13146
13103
|
// This is done to prevent sibling component effects from interfering with each other,
|
|
13147
13104
|
// e.g. a destroy function in one component should never override a ref set
|
|
@@ -13166,7 +13123,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe
|
|
|
13166
13123
|
var instance = finishedWork.stateNode;
|
|
13167
13124
|
|
|
13168
13125
|
if (finishedWork.flags & Update) {
|
|
13169
|
-
|
|
13126
|
+
{
|
|
13170
13127
|
if (current === null) {
|
|
13171
13128
|
// We could update instance props and state here,
|
|
13172
13129
|
// but instead we rely on them being set during last render.
|
|
@@ -13379,7 +13336,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe
|
|
|
13379
13336
|
}
|
|
13380
13337
|
}
|
|
13381
13338
|
|
|
13382
|
-
|
|
13339
|
+
{
|
|
13383
13340
|
{
|
|
13384
13341
|
if (finishedWork.flags & Ref) {
|
|
13385
13342
|
commitAttachRef(finishedWork);
|
|
@@ -13388,48 +13345,6 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe
|
|
|
13388
13345
|
}
|
|
13389
13346
|
}
|
|
13390
13347
|
|
|
13391
|
-
function reappearLayoutEffectsOnFiber(node) {
|
|
13392
|
-
// Turn on layout effects in a tree that previously disappeared.
|
|
13393
|
-
// TODO (Offscreen) Check: flags & LayoutStatic
|
|
13394
|
-
switch (node.tag) {
|
|
13395
|
-
case FunctionComponent:
|
|
13396
|
-
case ForwardRef:
|
|
13397
|
-
case SimpleMemoComponent:
|
|
13398
|
-
{
|
|
13399
|
-
if ( node.mode & ProfileMode) {
|
|
13400
|
-
try {
|
|
13401
|
-
startLayoutEffectTimer();
|
|
13402
|
-
safelyCallCommitHookLayoutEffectListMount(node, node.return);
|
|
13403
|
-
} finally {
|
|
13404
|
-
recordLayoutEffectDuration(node);
|
|
13405
|
-
}
|
|
13406
|
-
} else {
|
|
13407
|
-
safelyCallCommitHookLayoutEffectListMount(node, node.return);
|
|
13408
|
-
}
|
|
13409
|
-
|
|
13410
|
-
break;
|
|
13411
|
-
}
|
|
13412
|
-
|
|
13413
|
-
case ClassComponent:
|
|
13414
|
-
{
|
|
13415
|
-
var instance = node.stateNode;
|
|
13416
|
-
|
|
13417
|
-
if (typeof instance.componentDidMount === 'function') {
|
|
13418
|
-
safelyCallComponentDidMount(node, node.return, instance);
|
|
13419
|
-
}
|
|
13420
|
-
|
|
13421
|
-
safelyAttachRef(node, node.return);
|
|
13422
|
-
break;
|
|
13423
|
-
}
|
|
13424
|
-
|
|
13425
|
-
case HostComponent:
|
|
13426
|
-
{
|
|
13427
|
-
safelyAttachRef(node, node.return);
|
|
13428
|
-
break;
|
|
13429
|
-
}
|
|
13430
|
-
}
|
|
13431
|
-
}
|
|
13432
|
-
|
|
13433
13348
|
function hideOrUnhideAllChildren(finishedWork, isHidden) {
|
|
13434
13349
|
// Only hide or unhide the top-most host nodes.
|
|
13435
13350
|
var hostSubtreeRoot = null;
|
|
@@ -13875,7 +13790,7 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele
|
|
|
13875
13790
|
switch (deletedFiber.tag) {
|
|
13876
13791
|
case HostComponent:
|
|
13877
13792
|
{
|
|
13878
|
-
|
|
13793
|
+
{
|
|
13879
13794
|
safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
|
13880
13795
|
} // Intentional fallthrough to next branch
|
|
13881
13796
|
|
|
@@ -13948,7 +13863,7 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele
|
|
|
13948
13863
|
case MemoComponent:
|
|
13949
13864
|
case SimpleMemoComponent:
|
|
13950
13865
|
{
|
|
13951
|
-
|
|
13866
|
+
{
|
|
13952
13867
|
var updateQueue = deletedFiber.updateQueue;
|
|
13953
13868
|
|
|
13954
13869
|
if (updateQueue !== null) {
|
|
@@ -13990,7 +13905,7 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele
|
|
|
13990
13905
|
|
|
13991
13906
|
case ClassComponent:
|
|
13992
13907
|
{
|
|
13993
|
-
|
|
13908
|
+
{
|
|
13994
13909
|
safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
|
13995
13910
|
var instance = deletedFiber.stateNode;
|
|
13996
13911
|
|
|
@@ -14012,21 +13927,7 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele
|
|
|
14012
13927
|
|
|
14013
13928
|
case OffscreenComponent:
|
|
14014
13929
|
{
|
|
14015
|
-
|
|
14016
|
-
// If this offscreen component is hidden, we already unmounted it. Before
|
|
14017
|
-
// deleting the children, track that it's already unmounted so that we
|
|
14018
|
-
// don't attempt to unmount the effects again.
|
|
14019
|
-
// TODO: If the tree is hidden, in most cases we should be able to skip
|
|
14020
|
-
// over the nested children entirely. An exception is we haven't yet found
|
|
14021
|
-
// the topmost host node to delete, which we already track on the stack.
|
|
14022
|
-
// But the other case is portals, which need to be detached no matter how
|
|
14023
|
-
// deeply they are nested. We should use a subtree flag to track whether a
|
|
14024
|
-
// subtree includes a nested portal.
|
|
14025
|
-
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
|
|
14026
|
-
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;
|
|
14027
|
-
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
|
|
14028
|
-
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
|
|
14029
|
-
} else {
|
|
13930
|
+
{
|
|
14030
13931
|
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
|
|
14031
13932
|
}
|
|
14032
13933
|
|
|
@@ -14316,15 +14217,7 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
14316
14217
|
{
|
|
14317
14218
|
var _wasHidden = current !== null && current.memoizedState !== null;
|
|
14318
14219
|
|
|
14319
|
-
|
|
14320
|
-
// Before committing the children, track on the stack whether this
|
|
14321
|
-
// offscreen subtree was already hidden, so that we don't unmount the
|
|
14322
|
-
// effects again.
|
|
14323
|
-
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
|
|
14324
|
-
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;
|
|
14325
|
-
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
14326
|
-
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
|
|
14327
|
-
} else {
|
|
14220
|
+
{
|
|
14328
14221
|
recursivelyTraverseMutationEffects(root, finishedWork);
|
|
14329
14222
|
}
|
|
14330
14223
|
|
|
@@ -14341,21 +14234,6 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
14341
14234
|
|
|
14342
14235
|
_offscreenInstance.isHidden = _isHidden;
|
|
14343
14236
|
|
|
14344
|
-
if (_isHidden) {
|
|
14345
|
-
if (!_wasHidden) {
|
|
14346
|
-
if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {
|
|
14347
|
-
nextEffect = offscreenBoundary;
|
|
14348
|
-
var offscreenChild = offscreenBoundary.child;
|
|
14349
|
-
|
|
14350
|
-
while (offscreenChild !== null) {
|
|
14351
|
-
nextEffect = offscreenChild;
|
|
14352
|
-
disappearLayoutEffects_begin(offscreenChild);
|
|
14353
|
-
offscreenChild = offscreenChild.sibling;
|
|
14354
|
-
}
|
|
14355
|
-
}
|
|
14356
|
-
}
|
|
14357
|
-
}
|
|
14358
|
-
|
|
14359
14237
|
{
|
|
14360
14238
|
// TODO: This needs to run whenever there's an insertion or update
|
|
14361
14239
|
// inside a hidden Offscreen tree.
|
|
@@ -14431,51 +14309,6 @@ function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
|
|
|
14431
14309
|
var fiber = nextEffect;
|
|
14432
14310
|
var firstChild = fiber.child;
|
|
14433
14311
|
|
|
14434
|
-
if (fiber.tag === OffscreenComponent && isModernRoot) {
|
|
14435
|
-
// Keep track of the current Offscreen stack's state.
|
|
14436
|
-
var isHidden = fiber.memoizedState !== null;
|
|
14437
|
-
var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;
|
|
14438
|
-
|
|
14439
|
-
if (newOffscreenSubtreeIsHidden) {
|
|
14440
|
-
// The Offscreen tree is hidden. Skip over its layout effects.
|
|
14441
|
-
commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
|
|
14442
|
-
continue;
|
|
14443
|
-
} else {
|
|
14444
|
-
// TODO (Offscreen) Also check: subtreeFlags & LayoutMask
|
|
14445
|
-
var current = fiber.alternate;
|
|
14446
|
-
var wasHidden = current !== null && current.memoizedState !== null;
|
|
14447
|
-
var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;
|
|
14448
|
-
var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;
|
|
14449
|
-
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.
|
|
14450
|
-
|
|
14451
|
-
offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;
|
|
14452
|
-
offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;
|
|
14453
|
-
|
|
14454
|
-
if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {
|
|
14455
|
-
// This is the root of a reappearing boundary. Turn its layout effects
|
|
14456
|
-
// back on.
|
|
14457
|
-
nextEffect = fiber;
|
|
14458
|
-
reappearLayoutEffects_begin(fiber);
|
|
14459
|
-
}
|
|
14460
|
-
|
|
14461
|
-
var child = firstChild;
|
|
14462
|
-
|
|
14463
|
-
while (child !== null) {
|
|
14464
|
-
nextEffect = child;
|
|
14465
|
-
commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.
|
|
14466
|
-
root, committedLanes);
|
|
14467
|
-
child = child.sibling;
|
|
14468
|
-
} // Restore Offscreen state and resume in our-progress traversal.
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
nextEffect = fiber;
|
|
14472
|
-
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
|
|
14473
|
-
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
|
|
14474
|
-
commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);
|
|
14475
|
-
continue;
|
|
14476
|
-
}
|
|
14477
|
-
}
|
|
14478
|
-
|
|
14479
14312
|
if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {
|
|
14480
14313
|
firstChild.return = fiber;
|
|
14481
14314
|
nextEffect = firstChild;
|
|
@@ -14519,157 +14352,6 @@ function commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {
|
|
|
14519
14352
|
}
|
|
14520
14353
|
}
|
|
14521
14354
|
|
|
14522
|
-
function disappearLayoutEffects_begin(subtreeRoot) {
|
|
14523
|
-
while (nextEffect !== null) {
|
|
14524
|
-
var fiber = nextEffect;
|
|
14525
|
-
var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)
|
|
14526
|
-
|
|
14527
|
-
switch (fiber.tag) {
|
|
14528
|
-
case FunctionComponent:
|
|
14529
|
-
case ForwardRef:
|
|
14530
|
-
case MemoComponent:
|
|
14531
|
-
case SimpleMemoComponent:
|
|
14532
|
-
{
|
|
14533
|
-
if ( fiber.mode & ProfileMode) {
|
|
14534
|
-
try {
|
|
14535
|
-
startLayoutEffectTimer();
|
|
14536
|
-
commitHookEffectListUnmount(Layout, fiber, fiber.return);
|
|
14537
|
-
} finally {
|
|
14538
|
-
recordLayoutEffectDuration(fiber);
|
|
14539
|
-
}
|
|
14540
|
-
} else {
|
|
14541
|
-
commitHookEffectListUnmount(Layout, fiber, fiber.return);
|
|
14542
|
-
}
|
|
14543
|
-
|
|
14544
|
-
break;
|
|
14545
|
-
}
|
|
14546
|
-
|
|
14547
|
-
case ClassComponent:
|
|
14548
|
-
{
|
|
14549
|
-
// TODO (Offscreen) Check: flags & RefStatic
|
|
14550
|
-
safelyDetachRef(fiber, fiber.return);
|
|
14551
|
-
var instance = fiber.stateNode;
|
|
14552
|
-
|
|
14553
|
-
if (typeof instance.componentWillUnmount === 'function') {
|
|
14554
|
-
safelyCallComponentWillUnmount(fiber, fiber.return, instance);
|
|
14555
|
-
}
|
|
14556
|
-
|
|
14557
|
-
break;
|
|
14558
|
-
}
|
|
14559
|
-
|
|
14560
|
-
case HostComponent:
|
|
14561
|
-
{
|
|
14562
|
-
safelyDetachRef(fiber, fiber.return);
|
|
14563
|
-
break;
|
|
14564
|
-
}
|
|
14565
|
-
|
|
14566
|
-
case OffscreenComponent:
|
|
14567
|
-
{
|
|
14568
|
-
// Check if this is a
|
|
14569
|
-
var isHidden = fiber.memoizedState !== null;
|
|
14570
|
-
|
|
14571
|
-
if (isHidden) {
|
|
14572
|
-
// Nested Offscreen tree is already hidden. Don't disappear
|
|
14573
|
-
// its effects.
|
|
14574
|
-
disappearLayoutEffects_complete(subtreeRoot);
|
|
14575
|
-
continue;
|
|
14576
|
-
}
|
|
14577
|
-
|
|
14578
|
-
break;
|
|
14579
|
-
}
|
|
14580
|
-
} // TODO (Offscreen) Check: subtreeFlags & LayoutStatic
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
if (firstChild !== null) {
|
|
14584
|
-
firstChild.return = fiber;
|
|
14585
|
-
nextEffect = firstChild;
|
|
14586
|
-
} else {
|
|
14587
|
-
disappearLayoutEffects_complete(subtreeRoot);
|
|
14588
|
-
}
|
|
14589
|
-
}
|
|
14590
|
-
}
|
|
14591
|
-
|
|
14592
|
-
function disappearLayoutEffects_complete(subtreeRoot) {
|
|
14593
|
-
while (nextEffect !== null) {
|
|
14594
|
-
var fiber = nextEffect;
|
|
14595
|
-
|
|
14596
|
-
if (fiber === subtreeRoot) {
|
|
14597
|
-
nextEffect = null;
|
|
14598
|
-
return;
|
|
14599
|
-
}
|
|
14600
|
-
|
|
14601
|
-
var sibling = fiber.sibling;
|
|
14602
|
-
|
|
14603
|
-
if (sibling !== null) {
|
|
14604
|
-
sibling.return = fiber.return;
|
|
14605
|
-
nextEffect = sibling;
|
|
14606
|
-
return;
|
|
14607
|
-
}
|
|
14608
|
-
|
|
14609
|
-
nextEffect = fiber.return;
|
|
14610
|
-
}
|
|
14611
|
-
}
|
|
14612
|
-
|
|
14613
|
-
function reappearLayoutEffects_begin(subtreeRoot) {
|
|
14614
|
-
while (nextEffect !== null) {
|
|
14615
|
-
var fiber = nextEffect;
|
|
14616
|
-
var firstChild = fiber.child;
|
|
14617
|
-
|
|
14618
|
-
if (fiber.tag === OffscreenComponent) {
|
|
14619
|
-
var isHidden = fiber.memoizedState !== null;
|
|
14620
|
-
|
|
14621
|
-
if (isHidden) {
|
|
14622
|
-
// Nested Offscreen tree is still hidden. Don't re-appear its effects.
|
|
14623
|
-
reappearLayoutEffects_complete(subtreeRoot);
|
|
14624
|
-
continue;
|
|
14625
|
-
}
|
|
14626
|
-
} // TODO (Offscreen) Check: subtreeFlags & LayoutStatic
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
if (firstChild !== null) {
|
|
14630
|
-
// This node may have been reused from a previous render, so we can't
|
|
14631
|
-
// assume its return pointer is correct.
|
|
14632
|
-
firstChild.return = fiber;
|
|
14633
|
-
nextEffect = firstChild;
|
|
14634
|
-
} else {
|
|
14635
|
-
reappearLayoutEffects_complete(subtreeRoot);
|
|
14636
|
-
}
|
|
14637
|
-
}
|
|
14638
|
-
}
|
|
14639
|
-
|
|
14640
|
-
function reappearLayoutEffects_complete(subtreeRoot) {
|
|
14641
|
-
while (nextEffect !== null) {
|
|
14642
|
-
var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic
|
|
14643
|
-
|
|
14644
|
-
setCurrentFiber(fiber);
|
|
14645
|
-
|
|
14646
|
-
try {
|
|
14647
|
-
reappearLayoutEffectsOnFiber(fiber);
|
|
14648
|
-
} catch (error) {
|
|
14649
|
-
captureCommitPhaseError(fiber, fiber.return, error);
|
|
14650
|
-
}
|
|
14651
|
-
|
|
14652
|
-
resetCurrentFiber();
|
|
14653
|
-
|
|
14654
|
-
if (fiber === subtreeRoot) {
|
|
14655
|
-
nextEffect = null;
|
|
14656
|
-
return;
|
|
14657
|
-
}
|
|
14658
|
-
|
|
14659
|
-
var sibling = fiber.sibling;
|
|
14660
|
-
|
|
14661
|
-
if (sibling !== null) {
|
|
14662
|
-
// This node may have been reused from a previous render, so we can't
|
|
14663
|
-
// assume its return pointer is correct.
|
|
14664
|
-
sibling.return = fiber.return;
|
|
14665
|
-
nextEffect = sibling;
|
|
14666
|
-
return;
|
|
14667
|
-
}
|
|
14668
|
-
|
|
14669
|
-
nextEffect = fiber.return;
|
|
14670
|
-
}
|
|
14671
|
-
}
|
|
14672
|
-
|
|
14673
14355
|
function commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {
|
|
14674
14356
|
nextEffect = finishedWork;
|
|
14675
14357
|
commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);
|
|
@@ -15166,6 +14848,8 @@ function requestRetryLane(fiber) {
|
|
|
15166
14848
|
}
|
|
15167
14849
|
|
|
15168
14850
|
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
|
|
14851
|
+
checkForNestedUpdates();
|
|
14852
|
+
|
|
15169
14853
|
{
|
|
15170
14854
|
if (isRunningInsertionEffect) {
|
|
15171
14855
|
error('useInsertionEffect must not schedule updates.');
|
|
@@ -16802,7 +16486,7 @@ function jnd(timeElapsed) {
|
|
|
16802
16486
|
return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
|
|
16803
16487
|
}
|
|
16804
16488
|
|
|
16805
|
-
function
|
|
16489
|
+
function checkForNestedUpdates() {
|
|
16806
16490
|
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
|
|
16807
16491
|
nestedUpdateCount = 0;
|
|
16808
16492
|
rootWithNestedUpdates = null;
|
|
@@ -18005,7 +17689,7 @@ identifierPrefix, onRecoverableError, transitionCallbacks) {
|
|
|
18005
17689
|
return root;
|
|
18006
17690
|
}
|
|
18007
17691
|
|
|
18008
|
-
var ReactVersion = '18.2.0
|
|
17692
|
+
var ReactVersion = '18.2.0';
|
|
18009
17693
|
|
|
18010
17694
|
var didWarnAboutNestedUpdates;
|
|
18011
17695
|
|