React Native sync for revisions 424fe58...bd5bf55
Summary: Post: https://fb.workplace.com/groups/rnsyncsquad/permalink/879923262900946/ This sync includes the following changes: - **[fc3b6a411](https://github.com/facebook/react/commit/fc3b6a411 )**: Fix a few typos ([#22154](https://github.com/facebook/react/pull/22154)) //<Bowen>// - **[986d0e61d](https://github.com/facebook/react/commit/986d0e61d )**: [Scheduler] Add tests for isInputPending ([#22140](https://github.com/facebook/react/pull/22140)) //<Andrew Clark>// - **[d54be90be](https://github.com/facebook/react/commit/d54be90be )**: Set up test infra for dynamic Scheduler flags ([#22139](https://github.com/facebook/react/pull/22139)) //<Andrew Clark>// - **[7ed0706d7](https://github.com/facebook/react/commit/7ed0706d7 )**: Remove the warning for setState on unmounted components ([#22114](https://github.com/facebook/react/pull/22114)) //<Dan Abramov>// - **[9eb2aaaf8](https://github.com/facebook/react/commit/9eb2aaaf8 )**: Fixed ReactSharedInternals export in UMD bundle ([#22117](https://github.com/facebook/react/pull/22117)) //<Brian Vaughn>// - **[bd255700d](https://github.com/facebook/react/commit/bd255700d )**: Show a soft error when a text string or number is supplied as a child to non text wrappers ([#22109](https://github.com/facebook/react/pull/22109)) //<Sota>// Changelog: [General][Changed] - React Native sync for revisions 424fe58...bd5bf55 jest_e2e[run_all_tests] Reviewed By: yungsters Differential Revision: D30485521 fbshipit-source-id: c5b92356e9e666eae94536ed31b8de43536419f8
This commit is contained in:
Родитель
bc1c533833
Коммит
7299cb485e
|
@ -1 +1 @@
|
||||||
424fe587087d05302259d6d5ebb359675387f3b1
|
bd5bf555e1167e7088a4391e5cd419dccb39714c
|
|
@ -7,7 +7,7 @@
|
||||||
* @noflow
|
* @noflow
|
||||||
* @nolint
|
* @nolint
|
||||||
* @preventMunge
|
* @preventMunge
|
||||||
* @generated SignedSource<<903768081f51a5abfed30db7d6f33dd7>>
|
* @generated SignedSource<<0105b67942f03415395650d296aa846a>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -2939,7 +2939,7 @@ var MountPassiveDev =
|
||||||
4194304; // Groups of flags that are used in the commit phase to skip over trees that
|
4194304; // Groups of flags that are used in the commit phase to skip over trees that
|
||||||
// don't contain effects, by checking subtreeFlags.
|
// don't contain effects, by checking subtreeFlags.
|
||||||
|
|
||||||
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visiblity
|
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility
|
||||||
// flag logic (see #20043)
|
// flag logic (see #20043)
|
||||||
Update | Snapshot | 0;
|
Update | Snapshot | 0;
|
||||||
var MutationMask =
|
var MutationMask =
|
||||||
|
@ -2953,7 +2953,7 @@ var MutationMask =
|
||||||
var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask
|
var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask
|
||||||
|
|
||||||
var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
|
var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
|
||||||
// This allows certain concepts to persist without recalculting them,
|
// This allows certain concepts to persist without recalculating them,
|
||||||
// e.g. whether a subtree contains passive effects or portals.
|
// e.g. whether a subtree contains passive effects or portals.
|
||||||
|
|
||||||
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
|
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
|
||||||
|
@ -4988,8 +4988,10 @@ function createTextInstance(
|
||||||
hostContext,
|
hostContext,
|
||||||
internalInstanceHandle
|
internalInstanceHandle
|
||||||
) {
|
) {
|
||||||
|
{
|
||||||
if (!hostContext.isInAParentText) {
|
if (!hostContext.isInAParentText) {
|
||||||
throw Error("Text strings must be rendered within a <Text> component.");
|
error("Text strings must be rendered within a <Text> component.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var tag = nextReactTag;
|
var tag = nextReactTag;
|
||||||
|
@ -5859,7 +5861,7 @@ function flushSyncCallbacksOnlyInLegacyMode() {
|
||||||
}
|
}
|
||||||
function flushSyncCallbacks() {
|
function flushSyncCallbacks() {
|
||||||
if (!isFlushingSyncQueue && syncQueue !== null) {
|
if (!isFlushingSyncQueue && syncQueue !== null) {
|
||||||
// Prevent re-entrancy.
|
// Prevent re-entrance.
|
||||||
isFlushingSyncQueue = true;
|
isFlushingSyncQueue = true;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var previousUpdatePriority = getCurrentUpdatePriority();
|
var previousUpdatePriority = getCurrentUpdatePriority();
|
||||||
|
@ -5898,22 +5900,7 @@ function flushSyncCallbacks() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var NoFlags$1 =
|
var ReactVersion = "18.0.0-bd5bf555e-20210823";
|
||||||
/* */
|
|
||||||
0; // Represents whether effect should fire.
|
|
||||||
|
|
||||||
var HasEffect =
|
|
||||||
/* */
|
|
||||||
1; // Represents the phase in which the effect (not the clean-up) fires.
|
|
||||||
|
|
||||||
var Layout =
|
|
||||||
/* */
|
|
||||||
2;
|
|
||||||
var Passive$1 =
|
|
||||||
/* */
|
|
||||||
4;
|
|
||||||
|
|
||||||
var ReactVersion = "18.0.0-424fe5870-20210816";
|
|
||||||
|
|
||||||
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
|
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||||
var NoTransition = 0;
|
var NoTransition = 0;
|
||||||
|
@ -6710,7 +6697,7 @@ function readContext(context) {
|
||||||
|
|
||||||
// An array of all update queues that received updates during the current
|
// An array of all update queues that received updates during the current
|
||||||
// render. When this render exits, either because it finishes or because it is
|
// render. When this render exits, either because it finishes or because it is
|
||||||
// interrupted, the interleaved updates will be transfered onto the main part
|
// interrupted, the interleaved updates will be transferred onto the main part
|
||||||
// of the queue.
|
// of the queue.
|
||||||
var interleavedQueues = null;
|
var interleavedQueues = null;
|
||||||
function pushInterleavedQueue(queue) {
|
function pushInterleavedQueue(queue) {
|
||||||
|
@ -6823,7 +6810,7 @@ function enqueueUpdate(fiber, update, lane) {
|
||||||
if (interleaved === null) {
|
if (interleaved === null) {
|
||||||
// This is the first update. Create a circular list.
|
// This is the first update. Create a circular list.
|
||||||
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
||||||
// be transfered to the pending queue.
|
// be transferred to the pending queue.
|
||||||
|
|
||||||
pushInterleavedQueue(sharedQueue);
|
pushInterleavedQueue(sharedQueue);
|
||||||
} else {
|
} else {
|
||||||
|
@ -9866,6 +9853,21 @@ function findFirstSuspended(row) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var NoFlags$1 =
|
||||||
|
/* */
|
||||||
|
0; // Represents whether effect should fire.
|
||||||
|
|
||||||
|
var HasEffect =
|
||||||
|
/* */
|
||||||
|
1; // Represents the phase in which the effect (not the clean-up) fires.
|
||||||
|
|
||||||
|
var Layout =
|
||||||
|
/* */
|
||||||
|
2;
|
||||||
|
var Passive$1 =
|
||||||
|
/* */
|
||||||
|
4;
|
||||||
|
|
||||||
var isHydrating = false;
|
var isHydrating = false;
|
||||||
|
|
||||||
function enterHydrationState(fiber) {
|
function enterHydrationState(fiber) {
|
||||||
|
@ -10234,7 +10236,7 @@ function renderWithHooks(
|
||||||
children = Component(props, secondArg);
|
children = Component(props, secondArg);
|
||||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||||
} // We can assume the previous dispatcher is always this one, since we set it
|
} // We can assume the previous dispatcher is always this one, since we set it
|
||||||
// at the beginning of the render phase and there's no re-entrancy.
|
// at the beginning of the render phase and there's no re-entrance.
|
||||||
|
|
||||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||||
|
|
||||||
|
@ -10302,7 +10304,7 @@ function bailoutHooks(current, workInProgress, lanes) {
|
||||||
}
|
}
|
||||||
function resetHooksAfterThrow() {
|
function resetHooksAfterThrow() {
|
||||||
// We can assume the previous dispatcher is always this one, since we set it
|
// We can assume the previous dispatcher is always this one, since we set it
|
||||||
// at the beginning of the render phase and there's no re-entrancy.
|
// at the beginning of the render phase and there's no re-entrance.
|
||||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||||
|
|
||||||
if (didScheduleRenderPhaseUpdate) {
|
if (didScheduleRenderPhaseUpdate) {
|
||||||
|
@ -10667,7 +10669,7 @@ function rerenderReducer(reducer, initialArg, init) {
|
||||||
return [newState, dispatch];
|
return [newState, dispatch];
|
||||||
}
|
}
|
||||||
|
|
||||||
function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
|
function readFromUnsubscribedMutableSource(root, source, getSnapshot) {
|
||||||
{
|
{
|
||||||
warnAboutMultipleRenderersDEV(source);
|
warnAboutMultipleRenderersDEV(source);
|
||||||
}
|
}
|
||||||
|
@ -10799,7 +10801,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
|
var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
|
||||||
|
|
||||||
var _dispatcher$useState = dispatcher.useState(function() {
|
var _dispatcher$useState = dispatcher.useState(function() {
|
||||||
return readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
return readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
}),
|
}),
|
||||||
currentSnapshot = _dispatcher$useState[0],
|
currentSnapshot = _dispatcher$useState[0],
|
||||||
setSnapshot = _dispatcher$useState[1];
|
setSnapshot = _dispatcher$useState[1];
|
||||||
|
@ -10928,7 +10930,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
);
|
);
|
||||||
stateHook.queue = newQueue;
|
stateHook.queue = newQueue;
|
||||||
stateHook.baseQueue = null;
|
stateHook.baseQueue = null;
|
||||||
snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
stateHook.memoizedState = stateHook.baseState = snapshot;
|
stateHook.memoizedState = stateHook.baseState = snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11454,7 +11456,7 @@ function dispatchAction(fiber, queue, action) {
|
||||||
if (interleaved === null) {
|
if (interleaved === null) {
|
||||||
// This is the first update. Create a circular list.
|
// This is the first update. Create a circular list.
|
||||||
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
||||||
// be transfered to the pending queue.
|
// be transferred to the pending queue.
|
||||||
|
|
||||||
pushInterleavedQueue(queue);
|
pushInterleavedQueue(queue);
|
||||||
} else {
|
} else {
|
||||||
|
@ -13835,7 +13837,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||||
workInProgress.flags |= DidCapture;
|
workInProgress.flags |= DidCapture;
|
||||||
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
|
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
|
||||||
// part of the second pass. In that case nothing will subscribe to
|
// part of the second pass. In that case nothing will subscribe to
|
||||||
// its thennables. Instead, we'll transfer its thennables to the
|
// its thenables. Instead, we'll transfer its thenables to the
|
||||||
// SuspenseList so that it can retry if they resolve.
|
// SuspenseList so that it can retry if they resolve.
|
||||||
// There might be multiple of these in the list but since we're
|
// There might be multiple of these in the list but since we're
|
||||||
// going to wait for all of them anyway, it doesn't really matter
|
// going to wait for all of them anyway, it doesn't really matter
|
||||||
|
@ -13846,10 +13848,10 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||||
// doesn't matter since that means that the other boundaries that
|
// doesn't matter since that means that the other boundaries that
|
||||||
// we did find already has their listeners attached.
|
// we did find already has their listeners attached.
|
||||||
|
|
||||||
var newThennables = suspended.updateQueue;
|
var newThenables = suspended.updateQueue;
|
||||||
|
|
||||||
if (newThennables !== null) {
|
if (newThenables !== null) {
|
||||||
workInProgress.updateQueue = newThennables;
|
workInProgress.updateQueue = newThenables;
|
||||||
workInProgress.flags |= Update;
|
workInProgress.flags |= Update;
|
||||||
} // Rerender the whole list, but this time, we'll force fallbacks
|
} // Rerender the whole list, but this time, we'll force fallbacks
|
||||||
// to stay in place.
|
// to stay in place.
|
||||||
|
@ -13905,10 +13907,10 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||||
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
|
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
|
||||||
// get lost if this row ends up dropped during a second pass.
|
// get lost if this row ends up dropped during a second pass.
|
||||||
|
|
||||||
var _newThennables = _suspended.updateQueue;
|
var _newThenables = _suspended.updateQueue;
|
||||||
|
|
||||||
if (_newThennables !== null) {
|
if (_newThenables !== null) {
|
||||||
workInProgress.updateQueue = _newThennables;
|
workInProgress.updateQueue = _newThenables;
|
||||||
workInProgress.flags |= Update;
|
workInProgress.flags |= Update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15455,7 +15457,7 @@ function shouldRemainOnFallback(
|
||||||
var suspenseState = current.memoizedState;
|
var suspenseState = current.memoizedState;
|
||||||
|
|
||||||
if (suspenseState === null) {
|
if (suspenseState === null) {
|
||||||
// Currently showing content. Don't hide it, even if ForceSuspenseFallack
|
// Currently showing content. Don't hide it, even if ForceSuspenseFallback
|
||||||
// is true. More precise name might be "ForceRemainSuspenseFallback".
|
// is true. More precise name might be "ForceRemainSuspenseFallback".
|
||||||
// Note: This is a factoring smell. Can't remain on a fallback if there's
|
// Note: This is a factoring smell. Can't remain on a fallback if there's
|
||||||
// no fallback to remain on.
|
// no fallback to remain on.
|
||||||
|
@ -15507,7 +15509,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
|
||||||
|
|
||||||
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
|
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
|
||||||
pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
|
pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
|
||||||
// boundary's children. This involves some custom reconcilation logic. Two
|
// boundary's children. This involves some custom reconciliation logic. Two
|
||||||
// main reasons this is so complicated.
|
// main reasons this is so complicated.
|
||||||
//
|
//
|
||||||
// First, Legacy Mode has different semantics for backwards compatibility. The
|
// First, Legacy Mode has different semantics for backwards compatibility. The
|
||||||
|
@ -18356,7 +18358,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||||
// TODO: The factoring of this phase could probably be improved. Consider
|
// TODO: The factoring of this phase could probably be improved. Consider
|
||||||
// switching on the type of work before checking the flags. That's what
|
// switching on the type of work before checking the flags. That's what
|
||||||
// we do in all the other phases. I think this one is only different
|
// we do in all the other phases. I think this one is only different
|
||||||
// because of the shared reconcilation logic below.
|
// because of the shared reconciliation logic below.
|
||||||
var flags = finishedWork.flags;
|
var flags = finishedWork.flags;
|
||||||
|
|
||||||
if (flags & Ref) {
|
if (flags & Ref) {
|
||||||
|
@ -19003,10 +19005,7 @@ var nestedPassiveUpdateCount = 0; // If two updates are scheduled within the sam
|
||||||
// between the first and second call.
|
// between the first and second call.
|
||||||
|
|
||||||
var currentEventTime = NoTimestamp;
|
var currentEventTime = NoTimestamp;
|
||||||
var currentEventTransitionLane = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
|
var currentEventTransitionLane = NoLanes;
|
||||||
// We warn about state updates for unmounted components differently in this case.
|
|
||||||
|
|
||||||
var isFlushingPassiveEffects = false;
|
|
||||||
function getWorkInProgressRoot() {
|
function getWorkInProgressRoot() {
|
||||||
return workInProgressRoot;
|
return workInProgressRoot;
|
||||||
}
|
}
|
||||||
|
@ -19104,7 +19103,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
||||||
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
|
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
|
||||||
|
|
||||||
if (root === null) {
|
if (root === null) {
|
||||||
warnAboutUpdateOnUnmountedFiberInDEV(fiber);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20429,10 +20427,6 @@ function flushPassiveEffectsImpl() {
|
||||||
throw Error("Cannot flush passive effects while already rendering.");
|
throw Error("Cannot flush passive effects while already rendering.");
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
isFlushingPassiveEffects = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var prevExecutionContext = executionContext;
|
var prevExecutionContext = executionContext;
|
||||||
executionContext |= CommitContext;
|
executionContext |= CommitContext;
|
||||||
commitPassiveUnmountEffects(root.current);
|
commitPassiveUnmountEffects(root.current);
|
||||||
|
@ -20448,10 +20442,6 @@ function flushPassiveEffectsImpl() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
isFlushingPassiveEffects = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
commitDoubleInvokeEffectsInDEV(root.current, true);
|
commitDoubleInvokeEffectsInDEV(root.current, true);
|
||||||
}
|
}
|
||||||
|
@ -20831,86 +20821,6 @@ function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var didWarnStateUpdateForUnmountedComponent = null;
|
|
||||||
|
|
||||||
function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
|
|
||||||
{
|
|
||||||
var tag = fiber.tag;
|
|
||||||
|
|
||||||
if (
|
|
||||||
tag !== HostRoot &&
|
|
||||||
tag !== ClassComponent &&
|
|
||||||
tag !== FunctionComponent &&
|
|
||||||
tag !== ForwardRef &&
|
|
||||||
tag !== MemoComponent &&
|
|
||||||
tag !== SimpleMemoComponent
|
|
||||||
) {
|
|
||||||
// Only warn for user-defined components, not internal ones like Suspense.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((fiber.flags & PassiveStatic) !== NoFlags) {
|
|
||||||
var updateQueue = fiber.updateQueue;
|
|
||||||
|
|
||||||
if (updateQueue !== null) {
|
|
||||||
var lastEffect = updateQueue.lastEffect;
|
|
||||||
|
|
||||||
if (lastEffect !== null) {
|
|
||||||
var firstEffect = lastEffect.next;
|
|
||||||
var effect = firstEffect;
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (effect.destroy !== undefined) {
|
|
||||||
if ((effect.tag & Passive$1) !== NoFlags$1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
effect = effect.next;
|
|
||||||
} while (effect !== firstEffect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // We show the whole stack but dedupe on the top component's name because
|
|
||||||
// the problematic code almost always lies inside that component.
|
|
||||||
|
|
||||||
var componentName = getComponentNameFromFiber(fiber) || "ReactComponent";
|
|
||||||
|
|
||||||
if (didWarnStateUpdateForUnmountedComponent !== null) {
|
|
||||||
if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
didWarnStateUpdateForUnmountedComponent.add(componentName);
|
|
||||||
} else {
|
|
||||||
didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isFlushingPassiveEffects);
|
|
||||||
else {
|
|
||||||
var previousFiber = current;
|
|
||||||
|
|
||||||
try {
|
|
||||||
setCurrentFiber(fiber);
|
|
||||||
|
|
||||||
error(
|
|
||||||
"Can't perform a React state update on an unmounted component. This " +
|
|
||||||
"is a no-op, but it indicates a memory leak in your application. To " +
|
|
||||||
"fix, cancel all subscriptions and asynchronous tasks in %s.",
|
|
||||||
tag === ClassComponent
|
|
||||||
? "the componentWillUnmount method"
|
|
||||||
: "a useEffect cleanup function"
|
|
||||||
);
|
|
||||||
} finally {
|
|
||||||
if (previousFiber) {
|
|
||||||
setCurrentFiber(fiber);
|
|
||||||
} else {
|
|
||||||
resetCurrentFiber();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var beginWork$1;
|
var beginWork$1;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @noflow
|
* @noflow
|
||||||
* @nolint
|
* @nolint
|
||||||
* @preventMunge
|
* @preventMunge
|
||||||
* @generated SignedSource<<dd5900b4130b4f7db16a3c40d6b8eda4>>
|
* @generated SignedSource<<64b88a48c0e9e26ebfbee2286b912b78>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -1946,8 +1946,6 @@ function createTextInstance(
|
||||||
hostContext,
|
hostContext,
|
||||||
internalInstanceHandle
|
internalInstanceHandle
|
||||||
) {
|
) {
|
||||||
if (!hostContext.isInAParentText)
|
|
||||||
throw Error("Text strings must be rendered within a <Text> component.");
|
|
||||||
hostContext = nextReactTag;
|
hostContext = nextReactTag;
|
||||||
nextReactTag += 2;
|
nextReactTag += 2;
|
||||||
return {
|
return {
|
||||||
|
@ -3536,7 +3534,7 @@ function rerenderReducer(reducer) {
|
||||||
}
|
}
|
||||||
return [newState, dispatch];
|
return [newState, dispatch];
|
||||||
}
|
}
|
||||||
function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
|
function readFromUnsubscribedMutableSource(root, source, getSnapshot) {
|
||||||
var getVersion = source._getVersion;
|
var getVersion = source._getVersion;
|
||||||
getVersion = getVersion(source._source);
|
getVersion = getVersion(source._source);
|
||||||
var JSCompiler_inline_result = source._workInProgressVersionSecondary;
|
var JSCompiler_inline_result = source._workInProgressVersionSecondary;
|
||||||
|
@ -3563,7 +3561,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
version = getVersion(source._source),
|
version = getVersion(source._source),
|
||||||
dispatcher = ReactCurrentDispatcher$1.current,
|
dispatcher = ReactCurrentDispatcher$1.current,
|
||||||
_dispatcher$useState = dispatcher.useState(function() {
|
_dispatcher$useState = dispatcher.useState(function() {
|
||||||
return readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
return readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
}),
|
}),
|
||||||
setSnapshot = _dispatcher$useState[1],
|
setSnapshot = _dispatcher$useState[1],
|
||||||
snapshot = _dispatcher$useState[0];
|
snapshot = _dispatcher$useState[0];
|
||||||
|
@ -3626,7 +3624,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
)),
|
)),
|
||||||
(_dispatcher$useState.queue = hook),
|
(_dispatcher$useState.queue = hook),
|
||||||
(_dispatcher$useState.baseQueue = null),
|
(_dispatcher$useState.baseQueue = null),
|
||||||
(snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot)),
|
(snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)),
|
||||||
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
@ -7935,7 +7933,7 @@ var roots = new Map(),
|
||||||
devToolsConfig$jscomp$inline_948 = {
|
devToolsConfig$jscomp$inline_948 = {
|
||||||
findFiberByHostInstance: getInstanceFromInstance,
|
findFiberByHostInstance: getInstanceFromInstance,
|
||||||
bundleType: 0,
|
bundleType: 0,
|
||||||
version: "18.0.0-424fe5870-20210816",
|
version: "18.0.0-bd5bf555e-20210823",
|
||||||
rendererPackageName: "react-native-renderer",
|
rendererPackageName: "react-native-renderer",
|
||||||
rendererConfig: {
|
rendererConfig: {
|
||||||
getInspectorDataForViewTag: function() {
|
getInspectorDataForViewTag: function() {
|
||||||
|
@ -7977,7 +7975,7 @@ var internals$jscomp$inline_1189 = {
|
||||||
scheduleRoot: null,
|
scheduleRoot: null,
|
||||||
setRefreshHandler: null,
|
setRefreshHandler: null,
|
||||||
getCurrentFiber: null,
|
getCurrentFiber: null,
|
||||||
reconcilerVersion: "18.0.0-424fe5870-20210816"
|
reconcilerVersion: "18.0.0-bd5bf555e-20210823"
|
||||||
};
|
};
|
||||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||||
var hook$jscomp$inline_1190 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
var hook$jscomp$inline_1190 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @noflow
|
* @noflow
|
||||||
* @nolint
|
* @nolint
|
||||||
* @preventMunge
|
* @preventMunge
|
||||||
* @generated SignedSource<<0a406a6dac4993a931e2decfc7b53f27>>
|
* @generated SignedSource<<f021bce2048d654b3e2e31276c91433c>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -1994,8 +1994,6 @@ function createTextInstance(
|
||||||
hostContext,
|
hostContext,
|
||||||
internalInstanceHandle
|
internalInstanceHandle
|
||||||
) {
|
) {
|
||||||
if (!hostContext.isInAParentText)
|
|
||||||
throw Error("Text strings must be rendered within a <Text> component.");
|
|
||||||
hostContext = nextReactTag;
|
hostContext = nextReactTag;
|
||||||
nextReactTag += 2;
|
nextReactTag += 2;
|
||||||
return {
|
return {
|
||||||
|
@ -3584,7 +3582,7 @@ function rerenderReducer(reducer) {
|
||||||
}
|
}
|
||||||
return [newState, dispatch];
|
return [newState, dispatch];
|
||||||
}
|
}
|
||||||
function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
|
function readFromUnsubscribedMutableSource(root, source, getSnapshot) {
|
||||||
var getVersion = source._getVersion;
|
var getVersion = source._getVersion;
|
||||||
getVersion = getVersion(source._source);
|
getVersion = getVersion(source._source);
|
||||||
var JSCompiler_inline_result = source._workInProgressVersionSecondary;
|
var JSCompiler_inline_result = source._workInProgressVersionSecondary;
|
||||||
|
@ -3611,7 +3609,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
version = getVersion(source._source),
|
version = getVersion(source._source),
|
||||||
dispatcher = ReactCurrentDispatcher$1.current,
|
dispatcher = ReactCurrentDispatcher$1.current,
|
||||||
_dispatcher$useState = dispatcher.useState(function() {
|
_dispatcher$useState = dispatcher.useState(function() {
|
||||||
return readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
return readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
}),
|
}),
|
||||||
setSnapshot = _dispatcher$useState[1],
|
setSnapshot = _dispatcher$useState[1],
|
||||||
snapshot = _dispatcher$useState[0];
|
snapshot = _dispatcher$useState[0];
|
||||||
|
@ -3674,7 +3672,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
)),
|
)),
|
||||||
(_dispatcher$useState.queue = hook),
|
(_dispatcher$useState.queue = hook),
|
||||||
(_dispatcher$useState.baseQueue = null),
|
(_dispatcher$useState.baseQueue = null),
|
||||||
(snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot)),
|
(snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)),
|
||||||
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
@ -8380,7 +8378,7 @@ var roots = new Map(),
|
||||||
devToolsConfig$jscomp$inline_978 = {
|
devToolsConfig$jscomp$inline_978 = {
|
||||||
findFiberByHostInstance: getInstanceFromInstance,
|
findFiberByHostInstance: getInstanceFromInstance,
|
||||||
bundleType: 0,
|
bundleType: 0,
|
||||||
version: "18.0.0-424fe5870-20210816",
|
version: "18.0.0-bd5bf555e-20210823",
|
||||||
rendererPackageName: "react-native-renderer",
|
rendererPackageName: "react-native-renderer",
|
||||||
rendererConfig: {
|
rendererConfig: {
|
||||||
getInspectorDataForViewTag: function() {
|
getInspectorDataForViewTag: function() {
|
||||||
|
@ -8422,7 +8420,7 @@ var internals$jscomp$inline_1239 = {
|
||||||
scheduleRoot: null,
|
scheduleRoot: null,
|
||||||
setRefreshHandler: null,
|
setRefreshHandler: null,
|
||||||
getCurrentFiber: null,
|
getCurrentFiber: null,
|
||||||
reconcilerVersion: "18.0.0-424fe5870-20210816"
|
reconcilerVersion: "18.0.0-bd5bf555e-20210823"
|
||||||
};
|
};
|
||||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||||
var hook$jscomp$inline_1240 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
var hook$jscomp$inline_1240 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @noflow
|
* @noflow
|
||||||
* @nolint
|
* @nolint
|
||||||
* @preventMunge
|
* @preventMunge
|
||||||
* @generated SignedSource<<e74b8d1557f53a4257f357727e497d29>>
|
* @generated SignedSource<<121565373640523240f808b242fb487f>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -3226,7 +3226,7 @@ var MountPassiveDev =
|
||||||
4194304; // Groups of flags that are used in the commit phase to skip over trees that
|
4194304; // Groups of flags that are used in the commit phase to skip over trees that
|
||||||
// don't contain effects, by checking subtreeFlags.
|
// don't contain effects, by checking subtreeFlags.
|
||||||
|
|
||||||
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visiblity
|
var BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility
|
||||||
// flag logic (see #20043)
|
// flag logic (see #20043)
|
||||||
Update | Snapshot | 0;
|
Update | Snapshot | 0;
|
||||||
var MutationMask =
|
var MutationMask =
|
||||||
|
@ -3240,7 +3240,7 @@ var MutationMask =
|
||||||
var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask
|
var LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask
|
||||||
|
|
||||||
var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
|
var PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.
|
||||||
// This allows certain concepts to persist without recalculting them,
|
// This allows certain concepts to persist without recalculating them,
|
||||||
// e.g. whether a subtree contains passive effects or portals.
|
// e.g. whether a subtree contains passive effects or portals.
|
||||||
|
|
||||||
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
|
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
|
||||||
|
@ -6095,7 +6095,7 @@ function flushSyncCallbacksOnlyInLegacyMode() {
|
||||||
}
|
}
|
||||||
function flushSyncCallbacks() {
|
function flushSyncCallbacks() {
|
||||||
if (!isFlushingSyncQueue && syncQueue !== null) {
|
if (!isFlushingSyncQueue && syncQueue !== null) {
|
||||||
// Prevent re-entrancy.
|
// Prevent re-entrance.
|
||||||
isFlushingSyncQueue = true;
|
isFlushingSyncQueue = true;
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var previousUpdatePriority = getCurrentUpdatePriority();
|
var previousUpdatePriority = getCurrentUpdatePriority();
|
||||||
|
@ -6134,22 +6134,7 @@ function flushSyncCallbacks() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var NoFlags$1 =
|
var ReactVersion = "18.0.0-bd5bf555e-20210823";
|
||||||
/* */
|
|
||||||
0; // Represents whether effect should fire.
|
|
||||||
|
|
||||||
var HasEffect =
|
|
||||||
/* */
|
|
||||||
1; // Represents the phase in which the effect (not the clean-up) fires.
|
|
||||||
|
|
||||||
var Layout =
|
|
||||||
/* */
|
|
||||||
2;
|
|
||||||
var Passive$1 =
|
|
||||||
/* */
|
|
||||||
4;
|
|
||||||
|
|
||||||
var ReactVersion = "18.0.0-424fe5870-20210816";
|
|
||||||
|
|
||||||
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
|
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
|
||||||
var NoTransition = 0;
|
var NoTransition = 0;
|
||||||
|
@ -6946,7 +6931,7 @@ function readContext(context) {
|
||||||
|
|
||||||
// An array of all update queues that received updates during the current
|
// An array of all update queues that received updates during the current
|
||||||
// render. When this render exits, either because it finishes or because it is
|
// render. When this render exits, either because it finishes or because it is
|
||||||
// interrupted, the interleaved updates will be transfered onto the main part
|
// interrupted, the interleaved updates will be transferred onto the main part
|
||||||
// of the queue.
|
// of the queue.
|
||||||
var interleavedQueues = null;
|
var interleavedQueues = null;
|
||||||
function pushInterleavedQueue(queue) {
|
function pushInterleavedQueue(queue) {
|
||||||
|
@ -7059,7 +7044,7 @@ function enqueueUpdate(fiber, update, lane) {
|
||||||
if (interleaved === null) {
|
if (interleaved === null) {
|
||||||
// This is the first update. Create a circular list.
|
// This is the first update. Create a circular list.
|
||||||
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
||||||
// be transfered to the pending queue.
|
// be transferred to the pending queue.
|
||||||
|
|
||||||
pushInterleavedQueue(sharedQueue);
|
pushInterleavedQueue(sharedQueue);
|
||||||
} else {
|
} else {
|
||||||
|
@ -10102,6 +10087,21 @@ function findFirstSuspended(row) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var NoFlags$1 =
|
||||||
|
/* */
|
||||||
|
0; // Represents whether effect should fire.
|
||||||
|
|
||||||
|
var HasEffect =
|
||||||
|
/* */
|
||||||
|
1; // Represents the phase in which the effect (not the clean-up) fires.
|
||||||
|
|
||||||
|
var Layout =
|
||||||
|
/* */
|
||||||
|
2;
|
||||||
|
var Passive$1 =
|
||||||
|
/* */
|
||||||
|
4;
|
||||||
|
|
||||||
var isHydrating = false;
|
var isHydrating = false;
|
||||||
|
|
||||||
function enterHydrationState(fiber) {
|
function enterHydrationState(fiber) {
|
||||||
|
@ -10470,7 +10470,7 @@ function renderWithHooks(
|
||||||
children = Component(props, secondArg);
|
children = Component(props, secondArg);
|
||||||
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
} while (didScheduleRenderPhaseUpdateDuringThisPass);
|
||||||
} // We can assume the previous dispatcher is always this one, since we set it
|
} // We can assume the previous dispatcher is always this one, since we set it
|
||||||
// at the beginning of the render phase and there's no re-entrancy.
|
// at the beginning of the render phase and there's no re-entrance.
|
||||||
|
|
||||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||||
|
|
||||||
|
@ -10538,7 +10538,7 @@ function bailoutHooks(current, workInProgress, lanes) {
|
||||||
}
|
}
|
||||||
function resetHooksAfterThrow() {
|
function resetHooksAfterThrow() {
|
||||||
// We can assume the previous dispatcher is always this one, since we set it
|
// We can assume the previous dispatcher is always this one, since we set it
|
||||||
// at the beginning of the render phase and there's no re-entrancy.
|
// at the beginning of the render phase and there's no re-entrance.
|
||||||
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
|
||||||
|
|
||||||
if (didScheduleRenderPhaseUpdate) {
|
if (didScheduleRenderPhaseUpdate) {
|
||||||
|
@ -10903,7 +10903,7 @@ function rerenderReducer(reducer, initialArg, init) {
|
||||||
return [newState, dispatch];
|
return [newState, dispatch];
|
||||||
}
|
}
|
||||||
|
|
||||||
function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
|
function readFromUnsubscribedMutableSource(root, source, getSnapshot) {
|
||||||
{
|
{
|
||||||
warnAboutMultipleRenderersDEV(source);
|
warnAboutMultipleRenderersDEV(source);
|
||||||
}
|
}
|
||||||
|
@ -11035,7 +11035,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
|
var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
|
||||||
|
|
||||||
var _dispatcher$useState = dispatcher.useState(function() {
|
var _dispatcher$useState = dispatcher.useState(function() {
|
||||||
return readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
return readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
}),
|
}),
|
||||||
currentSnapshot = _dispatcher$useState[0],
|
currentSnapshot = _dispatcher$useState[0],
|
||||||
setSnapshot = _dispatcher$useState[1];
|
setSnapshot = _dispatcher$useState[1];
|
||||||
|
@ -11164,7 +11164,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
);
|
);
|
||||||
stateHook.queue = newQueue;
|
stateHook.queue = newQueue;
|
||||||
stateHook.baseQueue = null;
|
stateHook.baseQueue = null;
|
||||||
snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
stateHook.memoizedState = stateHook.baseState = snapshot;
|
stateHook.memoizedState = stateHook.baseState = snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11704,7 +11704,7 @@ function dispatchAction(fiber, queue, action) {
|
||||||
if (interleaved === null) {
|
if (interleaved === null) {
|
||||||
// This is the first update. Create a circular list.
|
// This is the first update. Create a circular list.
|
||||||
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
update.next = update; // At the end of the current render, this queue's interleaved updates will
|
||||||
// be transfered to the pending queue.
|
// be transferred to the pending queue.
|
||||||
|
|
||||||
pushInterleavedQueue(queue);
|
pushInterleavedQueue(queue);
|
||||||
} else {
|
} else {
|
||||||
|
@ -13892,7 +13892,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||||
workInProgress.flags |= DidCapture;
|
workInProgress.flags |= DidCapture;
|
||||||
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
|
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
|
||||||
// part of the second pass. In that case nothing will subscribe to
|
// part of the second pass. In that case nothing will subscribe to
|
||||||
// its thennables. Instead, we'll transfer its thennables to the
|
// its thenables. Instead, we'll transfer its thenables to the
|
||||||
// SuspenseList so that it can retry if they resolve.
|
// SuspenseList so that it can retry if they resolve.
|
||||||
// There might be multiple of these in the list but since we're
|
// There might be multiple of these in the list but since we're
|
||||||
// going to wait for all of them anyway, it doesn't really matter
|
// going to wait for all of them anyway, it doesn't really matter
|
||||||
|
@ -13903,10 +13903,10 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||||
// doesn't matter since that means that the other boundaries that
|
// doesn't matter since that means that the other boundaries that
|
||||||
// we did find already has their listeners attached.
|
// we did find already has their listeners attached.
|
||||||
|
|
||||||
var newThennables = suspended.updateQueue;
|
var newThenables = suspended.updateQueue;
|
||||||
|
|
||||||
if (newThennables !== null) {
|
if (newThenables !== null) {
|
||||||
workInProgress.updateQueue = newThennables;
|
workInProgress.updateQueue = newThenables;
|
||||||
workInProgress.flags |= Update;
|
workInProgress.flags |= Update;
|
||||||
} // Rerender the whole list, but this time, we'll force fallbacks
|
} // Rerender the whole list, but this time, we'll force fallbacks
|
||||||
// to stay in place.
|
// to stay in place.
|
||||||
|
@ -13962,10 +13962,10 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||||
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
|
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
|
||||||
// get lost if this row ends up dropped during a second pass.
|
// get lost if this row ends up dropped during a second pass.
|
||||||
|
|
||||||
var _newThennables = _suspended.updateQueue;
|
var _newThenables = _suspended.updateQueue;
|
||||||
|
|
||||||
if (_newThennables !== null) {
|
if (_newThenables !== null) {
|
||||||
workInProgress.updateQueue = _newThennables;
|
workInProgress.updateQueue = _newThenables;
|
||||||
workInProgress.flags |= Update;
|
workInProgress.flags |= Update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15515,7 +15515,7 @@ function shouldRemainOnFallback(
|
||||||
var suspenseState = current.memoizedState;
|
var suspenseState = current.memoizedState;
|
||||||
|
|
||||||
if (suspenseState === null) {
|
if (suspenseState === null) {
|
||||||
// Currently showing content. Don't hide it, even if ForceSuspenseFallack
|
// Currently showing content. Don't hide it, even if ForceSuspenseFallback
|
||||||
// is true. More precise name might be "ForceRemainSuspenseFallback".
|
// is true. More precise name might be "ForceRemainSuspenseFallback".
|
||||||
// Note: This is a factoring smell. Can't remain on a fallback if there's
|
// Note: This is a factoring smell. Can't remain on a fallback if there's
|
||||||
// no fallback to remain on.
|
// no fallback to remain on.
|
||||||
|
@ -15567,7 +15567,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
|
||||||
|
|
||||||
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
|
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
|
||||||
pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
|
pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
|
||||||
// boundary's children. This involves some custom reconcilation logic. Two
|
// boundary's children. This involves some custom reconciliation logic. Two
|
||||||
// main reasons this is so complicated.
|
// main reasons this is so complicated.
|
||||||
//
|
//
|
||||||
// First, Legacy Mode has different semantics for backwards compatibility. The
|
// First, Legacy Mode has different semantics for backwards compatibility. The
|
||||||
|
@ -18772,7 +18772,7 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||||
// TODO: The factoring of this phase could probably be improved. Consider
|
// TODO: The factoring of this phase could probably be improved. Consider
|
||||||
// switching on the type of work before checking the flags. That's what
|
// switching on the type of work before checking the flags. That's what
|
||||||
// we do in all the other phases. I think this one is only different
|
// we do in all the other phases. I think this one is only different
|
||||||
// because of the shared reconcilation logic below.
|
// because of the shared reconciliation logic below.
|
||||||
var flags = finishedWork.flags;
|
var flags = finishedWork.flags;
|
||||||
|
|
||||||
if (flags & ContentReset) {
|
if (flags & ContentReset) {
|
||||||
|
@ -19436,10 +19436,7 @@ var nestedPassiveUpdateCount = 0; // If two updates are scheduled within the sam
|
||||||
// between the first and second call.
|
// between the first and second call.
|
||||||
|
|
||||||
var currentEventTime = NoTimestamp;
|
var currentEventTime = NoTimestamp;
|
||||||
var currentEventTransitionLane = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
|
var currentEventTransitionLane = NoLanes;
|
||||||
// We warn about state updates for unmounted components differently in this case.
|
|
||||||
|
|
||||||
var isFlushingPassiveEffects = false;
|
|
||||||
function getWorkInProgressRoot() {
|
function getWorkInProgressRoot() {
|
||||||
return workInProgressRoot;
|
return workInProgressRoot;
|
||||||
}
|
}
|
||||||
|
@ -19537,7 +19534,6 @@ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
|
||||||
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
|
var root = markUpdateLaneFromFiberToRoot(fiber, lane);
|
||||||
|
|
||||||
if (root === null) {
|
if (root === null) {
|
||||||
warnAboutUpdateOnUnmountedFiberInDEV(fiber);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20862,10 +20858,6 @@ function flushPassiveEffectsImpl() {
|
||||||
throw Error("Cannot flush passive effects while already rendering.");
|
throw Error("Cannot flush passive effects while already rendering.");
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
isFlushingPassiveEffects = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var prevExecutionContext = executionContext;
|
var prevExecutionContext = executionContext;
|
||||||
executionContext |= CommitContext;
|
executionContext |= CommitContext;
|
||||||
commitPassiveUnmountEffects(root.current);
|
commitPassiveUnmountEffects(root.current);
|
||||||
|
@ -20881,10 +20873,6 @@ function flushPassiveEffectsImpl() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
isFlushingPassiveEffects = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
commitDoubleInvokeEffectsInDEV(root.current, true);
|
commitDoubleInvokeEffectsInDEV(root.current, true);
|
||||||
}
|
}
|
||||||
|
@ -21264,86 +21252,6 @@ function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var didWarnStateUpdateForUnmountedComponent = null;
|
|
||||||
|
|
||||||
function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
|
|
||||||
{
|
|
||||||
var tag = fiber.tag;
|
|
||||||
|
|
||||||
if (
|
|
||||||
tag !== HostRoot &&
|
|
||||||
tag !== ClassComponent &&
|
|
||||||
tag !== FunctionComponent &&
|
|
||||||
tag !== ForwardRef &&
|
|
||||||
tag !== MemoComponent &&
|
|
||||||
tag !== SimpleMemoComponent
|
|
||||||
) {
|
|
||||||
// Only warn for user-defined components, not internal ones like Suspense.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((fiber.flags & PassiveStatic) !== NoFlags) {
|
|
||||||
var updateQueue = fiber.updateQueue;
|
|
||||||
|
|
||||||
if (updateQueue !== null) {
|
|
||||||
var lastEffect = updateQueue.lastEffect;
|
|
||||||
|
|
||||||
if (lastEffect !== null) {
|
|
||||||
var firstEffect = lastEffect.next;
|
|
||||||
var effect = firstEffect;
|
|
||||||
|
|
||||||
do {
|
|
||||||
if (effect.destroy !== undefined) {
|
|
||||||
if ((effect.tag & Passive$1) !== NoFlags$1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
effect = effect.next;
|
|
||||||
} while (effect !== firstEffect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // We show the whole stack but dedupe on the top component's name because
|
|
||||||
// the problematic code almost always lies inside that component.
|
|
||||||
|
|
||||||
var componentName = getComponentNameFromFiber(fiber) || "ReactComponent";
|
|
||||||
|
|
||||||
if (didWarnStateUpdateForUnmountedComponent !== null) {
|
|
||||||
if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
didWarnStateUpdateForUnmountedComponent.add(componentName);
|
|
||||||
} else {
|
|
||||||
didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isFlushingPassiveEffects);
|
|
||||||
else {
|
|
||||||
var previousFiber = current;
|
|
||||||
|
|
||||||
try {
|
|
||||||
setCurrentFiber(fiber);
|
|
||||||
|
|
||||||
error(
|
|
||||||
"Can't perform a React state update on an unmounted component. This " +
|
|
||||||
"is a no-op, but it indicates a memory leak in your application. To " +
|
|
||||||
"fix, cancel all subscriptions and asynchronous tasks in %s.",
|
|
||||||
tag === ClassComponent
|
|
||||||
? "the componentWillUnmount method"
|
|
||||||
: "a useEffect cleanup function"
|
|
||||||
);
|
|
||||||
} finally {
|
|
||||||
if (previousFiber) {
|
|
||||||
setCurrentFiber(fiber);
|
|
||||||
} else {
|
|
||||||
resetCurrentFiber();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var beginWork$1;
|
var beginWork$1;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @noflow
|
* @noflow
|
||||||
* @nolint
|
* @nolint
|
||||||
* @preventMunge
|
* @preventMunge
|
||||||
* @generated SignedSource<<31a717b21f9596e634345cda771448c2>>
|
* @generated SignedSource<<4b2938a7eccbcb5ebcaad8eeb6f50cee>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -3505,7 +3505,7 @@ function rerenderReducer(reducer) {
|
||||||
}
|
}
|
||||||
return [newState, dispatch];
|
return [newState, dispatch];
|
||||||
}
|
}
|
||||||
function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
|
function readFromUnsubscribedMutableSource(root, source, getSnapshot) {
|
||||||
var getVersion = source._getVersion;
|
var getVersion = source._getVersion;
|
||||||
getVersion = getVersion(source._source);
|
getVersion = getVersion(source._source);
|
||||||
var JSCompiler_inline_result = source._workInProgressVersionPrimary;
|
var JSCompiler_inline_result = source._workInProgressVersionPrimary;
|
||||||
|
@ -3532,7 +3532,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
version = getVersion(source._source),
|
version = getVersion(source._source),
|
||||||
dispatcher = ReactCurrentDispatcher$1.current,
|
dispatcher = ReactCurrentDispatcher$1.current,
|
||||||
_dispatcher$useState = dispatcher.useState(function() {
|
_dispatcher$useState = dispatcher.useState(function() {
|
||||||
return readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
return readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
}),
|
}),
|
||||||
setSnapshot = _dispatcher$useState[1],
|
setSnapshot = _dispatcher$useState[1],
|
||||||
snapshot = _dispatcher$useState[0];
|
snapshot = _dispatcher$useState[0];
|
||||||
|
@ -3595,7 +3595,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
)),
|
)),
|
||||||
(_dispatcher$useState.queue = hook),
|
(_dispatcher$useState.queue = hook),
|
||||||
(_dispatcher$useState.baseQueue = null),
|
(_dispatcher$useState.baseQueue = null),
|
||||||
(snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot)),
|
(snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)),
|
||||||
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
@ -8024,7 +8024,7 @@ var roots = new Map(),
|
||||||
devToolsConfig$jscomp$inline_984 = {
|
devToolsConfig$jscomp$inline_984 = {
|
||||||
findFiberByHostInstance: getInstanceFromTag,
|
findFiberByHostInstance: getInstanceFromTag,
|
||||||
bundleType: 0,
|
bundleType: 0,
|
||||||
version: "18.0.0-424fe5870-20210816",
|
version: "18.0.0-bd5bf555e-20210823",
|
||||||
rendererPackageName: "react-native-renderer",
|
rendererPackageName: "react-native-renderer",
|
||||||
rendererConfig: {
|
rendererConfig: {
|
||||||
getInspectorDataForViewTag: function() {
|
getInspectorDataForViewTag: function() {
|
||||||
|
@ -8066,7 +8066,7 @@ var internals$jscomp$inline_1237 = {
|
||||||
scheduleRoot: null,
|
scheduleRoot: null,
|
||||||
setRefreshHandler: null,
|
setRefreshHandler: null,
|
||||||
getCurrentFiber: null,
|
getCurrentFiber: null,
|
||||||
reconcilerVersion: "18.0.0-424fe5870-20210816"
|
reconcilerVersion: "18.0.0-bd5bf555e-20210823"
|
||||||
};
|
};
|
||||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||||
var hook$jscomp$inline_1238 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
var hook$jscomp$inline_1238 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* @noflow
|
* @noflow
|
||||||
* @nolint
|
* @nolint
|
||||||
* @preventMunge
|
* @preventMunge
|
||||||
* @generated SignedSource<<b2e41a9671a2ba0a135979f8ad80d9ea>>
|
* @generated SignedSource<<0c9b6f8df4fa2dc914b10ed49e47e8c7>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -3553,7 +3553,7 @@ function rerenderReducer(reducer) {
|
||||||
}
|
}
|
||||||
return [newState, dispatch];
|
return [newState, dispatch];
|
||||||
}
|
}
|
||||||
function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
|
function readFromUnsubscribedMutableSource(root, source, getSnapshot) {
|
||||||
var getVersion = source._getVersion;
|
var getVersion = source._getVersion;
|
||||||
getVersion = getVersion(source._source);
|
getVersion = getVersion(source._source);
|
||||||
var JSCompiler_inline_result = source._workInProgressVersionPrimary;
|
var JSCompiler_inline_result = source._workInProgressVersionPrimary;
|
||||||
|
@ -3580,7 +3580,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
version = getVersion(source._source),
|
version = getVersion(source._source),
|
||||||
dispatcher = ReactCurrentDispatcher$1.current,
|
dispatcher = ReactCurrentDispatcher$1.current,
|
||||||
_dispatcher$useState = dispatcher.useState(function() {
|
_dispatcher$useState = dispatcher.useState(function() {
|
||||||
return readFromUnsubcribedMutableSource(root, source, getSnapshot);
|
return readFromUnsubscribedMutableSource(root, source, getSnapshot);
|
||||||
}),
|
}),
|
||||||
setSnapshot = _dispatcher$useState[1],
|
setSnapshot = _dispatcher$useState[1],
|
||||||
snapshot = _dispatcher$useState[0];
|
snapshot = _dispatcher$useState[0];
|
||||||
|
@ -3643,7 +3643,7 @@ function useMutableSource(hook, source, getSnapshot, subscribe) {
|
||||||
)),
|
)),
|
||||||
(_dispatcher$useState.queue = hook),
|
(_dispatcher$useState.queue = hook),
|
||||||
(_dispatcher$useState.baseQueue = null),
|
(_dispatcher$useState.baseQueue = null),
|
||||||
(snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot)),
|
(snapshot = readFromUnsubscribedMutableSource(root, source, getSnapshot)),
|
||||||
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
(_dispatcher$useState.memoizedState = _dispatcher$useState.baseState = snapshot));
|
||||||
return snapshot;
|
return snapshot;
|
||||||
}
|
}
|
||||||
|
@ -8457,7 +8457,7 @@ var roots = new Map(),
|
||||||
devToolsConfig$jscomp$inline_1014 = {
|
devToolsConfig$jscomp$inline_1014 = {
|
||||||
findFiberByHostInstance: getInstanceFromTag,
|
findFiberByHostInstance: getInstanceFromTag,
|
||||||
bundleType: 0,
|
bundleType: 0,
|
||||||
version: "18.0.0-424fe5870-20210816",
|
version: "18.0.0-bd5bf555e-20210823",
|
||||||
rendererPackageName: "react-native-renderer",
|
rendererPackageName: "react-native-renderer",
|
||||||
rendererConfig: {
|
rendererConfig: {
|
||||||
getInspectorDataForViewTag: function() {
|
getInspectorDataForViewTag: function() {
|
||||||
|
@ -8499,7 +8499,7 @@ var internals$jscomp$inline_1287 = {
|
||||||
scheduleRoot: null,
|
scheduleRoot: null,
|
||||||
setRefreshHandler: null,
|
setRefreshHandler: null,
|
||||||
getCurrentFiber: null,
|
getCurrentFiber: null,
|
||||||
reconcilerVersion: "18.0.0-424fe5870-20210816"
|
reconcilerVersion: "18.0.0-bd5bf555e-20210823"
|
||||||
};
|
};
|
||||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||||
var hook$jscomp$inline_1288 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
var hook$jscomp$inline_1288 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче