7
7
* @noflow
8
8
* @nolint
9
9
* @preventMunge
10
- * @generated SignedSource<<903768081f51a5abfed30db7d6f33dd7 >>
10
+ * @generated SignedSource<<0105b67942f03415395650d296aa846a >>
11
11
*/
12
12
13
13
'use strict';
@@ -2939,7 +2939,7 @@ var MountPassiveDev =
2939
2939
4194304; // Groups of flags that are used in the commit phase to skip over trees that
2940
2940
// don't contain effects, by checking subtreeFlags.
2941
2941
2942
- var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visiblity
2942
+ var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility
2943
2943
// flag logic (see #20043)
2944
2944
Update | Snapshot | 0;
2945
2945
var MutationMask =
@@ -2953,7 +2953,7 @@ var MutationMask =
2953
2953
var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask
2954
2954
2955
2955
var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
2956
- // This allows certain concepts to persist without recalculting them,
2956
+ // This allows certain concepts to persist without recalculating them,
2957
2957
// e.g. whether a subtree contains passive effects or portals.
2958
2958
2959
2959
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
@@ -4988,8 +4988,10 @@ function createTextInstance(
4988
4988
hostContext,
4989
4989
internalInstanceHandle
4990
4990
) {
4991
- if (!hostContext.isInAParentText) {
4992
- throw Error("Text strings must be rendered within a <Text> component.");
4991
+ {
4992
+ if (!hostContext.isInAParentText) {
4993
+ error("Text strings must be rendered within a <Text> component.");
4994
+ }
4993
4995
}
4994
4996
4995
4997
var tag = nextReactTag;
@@ -5859,7 +5861,7 @@ function flushSyncCallbacksOnlyInLegacyMode() {
5859
5861
}
5860
5862
function flushSyncCallbacks() {
5861
5863
if (!isFlushingSyncQueue && syncQueue !== null) {
5862
- // Prevent re-entrancy .
5864
+ // Prevent re-entrance .
5863
5865
isFlushingSyncQueue = true;
5864
5866
var i = 0;
5865
5867
var previousUpdatePriority = getCurrentUpdatePriority();
@@ -5898,22 +5900,7 @@ function flushSyncCallbacks() {
5898
5900
return null;
5899
5901
}
5900
5902
5901
- var NoFlags$1 =
5902
- /* */
5903
- 0; // Represents whether effect should fire.
5904
-
5905
- var HasEffect =
5906
- /* */
5907
- 1; // Represents the phase in which the effect (not the clean-up) fires.
5908
-
5909
- var Layout =
5910
- /* */
5911
- 2;
5912
- var Passive$1 =
5913
- /* */
5914
- 4;
5915
-
5916
- var ReactVersion = "18.0.0-424fe5870-20210816";
5903
+ var ReactVersion = "18.0.0-bd5bf555e-20210823";
5917
5904
5918
5905
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
5919
5906
var NoTransition = 0;
@@ -6710,7 +6697,7 @@ function readContext(context) {
6710
6697
6711
6698
// An array of all update queues that received updates during the current
6712
6699
// render. When this render exits, either because it finishes or because it is
6713
- // interrupted, the interleaved updates will be transfered onto the main part
6700
+ // interrupted, the interleaved updates will be transferred onto the main part
6714
6701
// of the queue.
6715
6702
var interleavedQueues = null;
6716
6703
function pushInterleavedQueue(queue) {
@@ -6823,7 +6810,7 @@ function enqueueUpdate(fiber, update, lane) {
6823
6810
if (interleaved === null) {
6824
6811
// This is the first update. Create a circular list.
6825
6812
update.next = update; // At the end of the current render, this queue's interleaved updates will
6826
- // be transfered to the pending queue.
6813
+ // be transferred to the pending queue.
6827
6814
6828
6815
pushInterleavedQueue(sharedQueue);
6829
6816
} else {
@@ -9866,6 +9853,21 @@ function findFirstSuspended(row) {
9866
9853
return null;
9867
9854
}
9868
9855
9856
+ var NoFlags$1 =
9857
+ /* */
9858
+ 0; // Represents whether effect should fire.
9859
+
9860
+ var HasEffect =
9861
+ /* */
9862
+ 1; // Represents the phase in which the effect (not the clean-up) fires.
9863
+
9864
+ var Layout =
9865
+ /* */
9866
+ 2;
9867
+ var Passive$1 =
9868
+ /* */
9869
+ 4;
9870
+
9869
9871
var isHydrating = false;
9870
9872
9871
9873
function enterHydrationState(fiber) {
@@ -10234,7 +10236,7 @@ function renderWithHooks(
10234
10236
children = Component(props, secondArg);
10235
10237
} while (didScheduleRenderPhaseUpdateDuringThisPass);
10236
10238
} // We can assume the previous dispatcher is always this one, since we set it
10237
- // at the beginning of the render phase and there's no re-entrancy .
10239
+ // at the beginning of the render phase and there's no re-entrance .
10238
10240
10239
10241
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
10240
10242
@@ -10302,7 +10304,7 @@ function bailoutHooks(current, workInProgress, lanes) {
10302
10304
}
10303
10305
function resetHooksAfterThrow() {
10304
10306
// We can assume the previous dispatcher is always this one, since we set it
10305
- // at the beginning of the render phase and there's no re-entrancy .
10307
+ // at the beginning of the render phase and there's no re-entrance .
10306
10308
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
10307
10309
10308
10310
if (didScheduleRenderPhaseUpdate) {
@@ -10667,7 +10669,7 @@ function rerenderReducer(reducer, initialArg, init) {
10667
10669
return [newState, dispatch];
10668
10670
}
10669
10671
10670
- function readFromUnsubcribedMutableSource (root, source, getSnapshot) {
10672
+ function readFromUnsubscribedMutableSource (root, source, getSnapshot) {
10671
10673
{
10672
10674
warnAboutMultipleRenderersDEV(source);
10673
10675
}
@@ -10799,7 +10801,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
10799
10801
var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
10800
10802
10801
10803
var _dispatcher$useState = dispatcher.useState(function() {
10802
- return readFromUnsubcribedMutableSource (root, source, getSnapshot);
10804
+ return readFromUnsubscribedMutableSource (root, source, getSnapshot);
10803
10805
}),
10804
10806
currentSnapshot = _dispatcher$useState[0],
10805
10807
setSnapshot = _dispatcher$useState[1];
@@ -10928,7 +10930,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
10928
10930
);
10929
10931
stateHook.queue = newQueue;
10930
10932
stateHook.baseQueue = null;
10931
- snapshot = readFromUnsubcribedMutableSource (root, source, getSnapshot);
10933
+ snapshot = readFromUnsubscribedMutableSource (root, source, getSnapshot);
10932
10934
stateHook.memoizedState = stateHook.baseState = snapshot;
10933
10935
}
10934
10936
@@ -11454,7 +11456,7 @@ function dispatchAction(fiber, queue, action) {
11454
11456
if (interleaved === null) {
11455
11457
// This is the first update. Create a circular list.
11456
11458
update.next = update; // At the end of the current render, this queue's interleaved updates will
11457
- // be transfered to the pending queue.
11459
+ // be transferred to the pending queue.
11458
11460
11459
11461
pushInterleavedQueue(queue);
11460
11462
} else {
@@ -13835,7 +13837,7 @@ function completeWork(current, workInProgress, renderLanes) {
13835
13837
workInProgress.flags |= DidCapture;
13836
13838
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
13837
13839
// part of the second pass. In that case nothing will subscribe to
13838
- // its thennables . Instead, we'll transfer its thennables to the
13840
+ // its thenables . Instead, we'll transfer its thenables to the
13839
13841
// SuspenseList so that it can retry if they resolve.
13840
13842
// There might be multiple of these in the list but since we're
13841
13843
// going to wait for all of them anyway, it doesn't really matter
@@ -13846,10 +13848,10 @@ function completeWork(current, workInProgress, renderLanes) {
13846
13848
// doesn't matter since that means that the other boundaries that
13847
13849
// we did find already has their listeners attached.
13848
13850
13849
- var newThennables = suspended.updateQueue;
13851
+ var newThenables = suspended.updateQueue;
13850
13852
13851
- if (newThennables !== null) {
13852
- workInProgress.updateQueue = newThennables ;
13853
+ if (newThenables !== null) {
13854
+ workInProgress.updateQueue = newThenables ;
13853
13855
workInProgress.flags |= Update;
13854
13856
} // Rerender the whole list, but this time, we'll force fallbacks
13855
13857
// to stay in place.
@@ -13905,10 +13907,10 @@ function completeWork(current, workInProgress, renderLanes) {
13905
13907
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
13906
13908
// get lost if this row ends up dropped during a second pass.
13907
13909
13908
- var _newThennables = _suspended.updateQueue;
13910
+ var _newThenables = _suspended.updateQueue;
13909
13911
13910
- if (_newThennables !== null) {
13911
- workInProgress.updateQueue = _newThennables ;
13912
+ if (_newThenables !== null) {
13913
+ workInProgress.updateQueue = _newThenables ;
13912
13914
workInProgress.flags |= Update;
13913
13915
}
13914
13916
@@ -15455,7 +15457,7 @@ function shouldRemainOnFallback(
15455
15457
var suspenseState = current.memoizedState;
15456
15458
15457
15459
if (suspenseState === null) {
15458
- // Currently showing content. Don't hide it, even if ForceSuspenseFallack
15460
+ // Currently showing content. Don't hide it, even if ForceSuspenseFallback
15459
15461
// is true. More precise name might be "ForceRemainSuspenseFallback".
15460
15462
// Note: This is a factoring smell. Can't remain on a fallback if there's
15461
15463
// no fallback to remain on.
@@ -15507,7 +15509,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
15507
15509
15508
15510
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
15509
15511
pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
15510
- // boundary's children. This involves some custom reconcilation logic. Two
15512
+ // boundary's children. This involves some custom reconciliation logic. Two
15511
15513
// main reasons this is so complicated.
15512
15514
//
15513
15515
// First, Legacy Mode has different semantics for backwards compatibility. The
@@ -18356,7 +18358,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
18356
18358
// TODO: The factoring of this phase could probably be improved. Consider
18357
18359
// switching on the type of work before checking the flags. That's what
18358
18360
// we do in all the other phases. I think this one is only different
18359
- // because of the shared reconcilation logic below.
18361
+ // because of the shared reconciliation logic below.
18360
18362
var flags = finishedWork.flags;
18361
18363
18362
18364
if (flags & Ref) {
@@ -19003,10 +19005,7 @@ var nestedPassiveUpdateCount = 0; // If two updates are scheduled within the sam
19003
19005
// between the first and second call.
19004
19006
19005
19007
var currentEventTime = NoTimestamp;
19006
- var currentEventTransitionLane = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
19007
- // We warn about state updates for unmounted components differently in this case.
19008
-
19009
- var isFlushingPassiveEffects = false;
19008
+ var currentEventTransitionLane = NoLanes;
19010
19009
function getWorkInProgressRoot() {
19011
19010
return workInProgressRoot;
19012
19011
}
@@ -19104,7 +19103,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
19104
19103
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
19105
19104
19106
19105
if (root === null) {
19107
- warnAboutUpdateOnUnmountedFiberInDEV(fiber);
19108
19106
return null;
19109
19107
}
19110
19108
@@ -20429,10 +20427,6 @@ function flushPassiveEffectsImpl() {
20429
20427
throw Error("Cannot flush passive effects while already rendering.");
20430
20428
}
20431
20429
20432
- {
20433
- isFlushingPassiveEffects = true;
20434
- }
20435
-
20436
20430
var prevExecutionContext = executionContext;
20437
20431
executionContext |= CommitContext;
20438
20432
commitPassiveUnmountEffects(root.current);
@@ -20448,10 +20442,6 @@ function flushPassiveEffectsImpl() {
20448
20442
}
20449
20443
}
20450
20444
20451
- {
20452
- isFlushingPassiveEffects = false;
20453
- }
20454
-
20455
20445
{
20456
20446
commitDoubleInvokeEffectsInDEV(root.current, true);
20457
20447
}
@@ -20831,86 +20821,6 @@ function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
20831
20821
}
20832
20822
}
20833
20823
20834
- var didWarnStateUpdateForUnmountedComponent = null;
20835
-
20836
- function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
20837
- {
20838
- var tag = fiber.tag;
20839
-
20840
- if (
20841
- tag !== HostRoot &&
20842
- tag !== ClassComponent &&
20843
- tag !== FunctionComponent &&
20844
- tag !== ForwardRef &&
20845
- tag !== MemoComponent &&
20846
- tag !== SimpleMemoComponent
20847
- ) {
20848
- // Only warn for user-defined components, not internal ones like Suspense.
20849
- return;
20850
- }
20851
-
20852
- if ((fiber.flags & PassiveStatic) !== NoFlags) {
20853
- var updateQueue = fiber.updateQueue;
20854
-
20855
- if (updateQueue !== null) {
20856
- var lastEffect = updateQueue.lastEffect;
20857
-
20858
- if (lastEffect !== null) {
20859
- var firstEffect = lastEffect.next;
20860
- var effect = firstEffect;
20861
-
20862
- do {
20863
- if (effect.destroy !== undefined) {
20864
- if ((effect.tag & Passive$1) !== NoFlags$1) {
20865
- return;
20866
- }
20867
- }
20868
-
20869
- effect = effect.next;
20870
- } while (effect !== firstEffect);
20871
- }
20872
- }
20873
- } // We show the whole stack but dedupe on the top component's name because
20874
- // the problematic code almost always lies inside that component.
20875
-
20876
- var componentName = getComponentNameFromFiber(fiber) || "ReactComponent";
20877
-
20878
- if (didWarnStateUpdateForUnmountedComponent !== null) {
20879
- if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
20880
- return;
20881
- }
20882
-
20883
- didWarnStateUpdateForUnmountedComponent.add(componentName);
20884
- } else {
20885
- didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
20886
- }
20887
-
20888
- if (isFlushingPassiveEffects);
20889
- else {
20890
- var previousFiber = current;
20891
-
20892
- try {
20893
- setCurrentFiber(fiber);
20894
-
20895
- error(
20896
- "Can't perform a React state update on an unmounted component. This " +
20897
- "is a no-op, but it indicates a memory leak in your application. To " +
20898
- "fix, cancel all subscriptions and asynchronous tasks in %s.",
20899
- tag === ClassComponent
20900
- ? "the componentWillUnmount method"
20901
- : "a useEffect cleanup function"
20902
- );
20903
- } finally {
20904
- if (previousFiber) {
20905
- setCurrentFiber(fiber);
20906
- } else {
20907
- resetCurrentFiber();
20908
- }
20909
- }
20910
- }
20911
- }
20912
- }
20913
-
20914
20824
var beginWork$1;
20915
20825
20916
20826
{
0 commit comments