React sync for revisions 55bc393...85d05b3

Summary:
This sync includes the following changes:
- **[85d05b3a4](https://github.com/facebook/react/commit/85d05b3a4 )**: Bump package.json versions //<Andrew Clark>//
- **[d9fdec6cf](https://github.com/facebook/react/commit/d9fdec6cf )**: [Flare] Remove contextmenu logic from Press (#16322) //<Dominic Gannaway>//
- **[12be8938a](https://github.com/facebook/react/commit/12be8938a )**: [Fresh] Support multiple renderers at the same time (#16302) //<Dan Abramov>//
- **[6f3c8332d](https://github.com/facebook/react/commit/6f3c8332d )**: Reset hydration state after reentering (#16306) //<Sebastian Markbåge>//
- **[028c07f89](https://github.com/facebook/react/commit/028c07f89 )**: Ensure Fundamental flags are added to more locations (#16311) //<Dominic Gannaway>//
- **[9dfe973b5](https://github.com/facebook/react/commit/9dfe973b5 )**: Nit: fix inconsistent spacing in a warning (#16310) //<Dan Abramov>//
- **[c4f0b9370](https://github.com/facebook/react/commit/c4f0b9370 )**: Warn when Using String Refs (#16217) //<lunaruan>//
- **[7c838a645](https://github.com/facebook/react/commit/7c838a645 )**: [Flare] Adds support for hydrating host components with listeners (#16304) //<Dominic Gannaway>//
- **[ed4970079](https://github.com/facebook/react/commit/ed4970079 )**: [react-events] Separate the Focus/FocusWithin unit tests (#16298) //<Nicolas Gallagher>//
- **[23405c9c4](https://github.com/facebook/react/commit/23405c9c4 )**: [react-events] Add ContextMenu responder (#16296) //<Nicolas Gallagher>//
- **[606f76b6e](https://github.com/facebook/react/commit/606f76b6e )**: Fix hydration bug with nested suspense boundaries (#16288) //<Sebastian Markbåge>//
- **[a1dbb852c](https://github.com/facebook/react/commit/a1dbb852c )**: warn if you try to use act() in prod (#16282) //<Sunil Pai>//
- **[dc232e677](https://github.com/facebook/react/commit/dc232e677 )**: chore: remove outdated comment about gcc (#16232) //<Ashwin Ramaswami>//
- **[6b565ce73](https://github.com/facebook/react/commit/6b565ce73 )**: Rendering tasks should not jump the queue (#16284) //<Andrew Clark>//
- **[c4c9f086e](https://github.com/facebook/react/commit/c4c9f086e )**: BugFix: Suspense priority warning firing when not supposed to (#16256) //<lunaruan>//
- **[05dce7598](https://github.com/facebook/react/commit/05dce7598 )**: Fix priority of clean-up function on deletion (#16277) //<Andrew Clark>//
- **[a53f5cc22](https://github.com/facebook/react/commit/a53f5cc22 )**: [SuspenseList] Bug fix: Reset renderState when bailing out (#16278) //<Sebastian Markbåge>//
- **[0c1ec049f](https://github.com/facebook/react/commit/0c1ec049f )**: Add a feature flag to disable legacy context (#16269) //<Dan Abramov>//
- **[42794557c](https://github.com/facebook/react/commit/42794557c )**: [Flare] Tweaks to Flare system design and API (#16264) //<Dominic Gannaway>//
- **[b5af4fe3c](https://github.com/facebook/react/commit/b5af4fe3c )**: Remove FocusScope (#16267) //<Dominic Gannaway>//
- **[375616788](https://github.com/facebook/react/commit/375616788 )**: Add missing check to unmocked Scheduler warning (#16261) //<Andrew Clark>//
- **[f939df402](https://github.com/facebook/react/commit/f939df402 )**: [act] Wrap IsThisRendererActing in DEV check (#16259) //<Andrew Clark>//
- **[f440bfd55](https://github.com/facebook/react/commit/f440bfd55 )**: Bugfix:  Effects should never have higher than normal priority (#16257) //<Andrew Clark>//
- **[db3ae32b8](https://github.com/facebook/react/commit/db3ae32b8 )**: flush fallbacks in tests (#16240) //<Sunil Pai>//
- **[e6a0473c3](https://github.com/facebook/react/commit/e6a0473c3 )**: Warn when rendering tests in concurrent/batched mode without a mocked scheduler (#16207) //<Sunil Pai>//
- **[e276a5e85](https://github.com/facebook/react/commit/e276a5e85 )**: [Flare] Remove delay props from Hover (#16248) //<Nicolas Gallagher>//
- **[1912b4a0f](https://github.com/facebook/react/commit/1912b4a0f )**: [Flare] Remove delay props from Press (#16247) //<Nicolas Gallagher>//

Changelog:
[General][Changed] - React sync for revisions 55bc393...85d05b3

Reviewed By: zackargyle, rickhanlonii

Differential Revision: D16720468

fbshipit-source-id: 1884ef67f404623697f516cd77ad952d1fbb4737
This commit is contained in:
Eli White 2019-08-09 14:20:48 -07:00 коммит произвёл Facebook Github Bot
Родитель bfecb1266a
Коммит 0ccedf3964
17 изменённых файлов: 4596 добавлений и 4072 удалений

Просмотреть файл

@ -1 +1 @@
55bc393f726ddf3def83ca5a43cfc38a45d2e421
85d05b3a4d439c504ee43652d586ee253a01faf6

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1102,6 +1102,7 @@ function getComponentName(type) {
}
return null;
}
require("../shims/ReactFeatureFlags");
function isFiberMountedImpl(fiber) {
var node = fiber;
if (fiber.alternate) for (; node.return; ) node = node.return;
@ -1451,7 +1452,6 @@ function restoreStateOfTarget(target) {
)
);
}
require("../shims/ReactFeatureFlags");
function batchedUpdatesImpl(fn, bookkeeping) {
return fn(bookkeeping);
}
@ -2065,7 +2065,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3282,24 +3281,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3650,7 +3633,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3724,7 +3707,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3779,7 +3762,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
hydrationParentFiber = null,
nextHydratableInstance = null,
@ -3998,17 +3981,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -4932,6 +4915,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -4960,6 +4952,56 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = current$$1$jscomp$0.updateQueue;
if (
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var firstEffect = updateQueue.next;
runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@ -5078,6 +5120,8 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@ -5903,7 +5947,6 @@ function completeUnitOfWork(unitOfWork) {
: {
expirationTime: type.expirationTime,
firstContext: type.firstContext,
listeners: type.listeners,
responders: type.responders
})),
(renderExpirationTime$jscomp$0 =
@ -6035,16 +6078,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority$1(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority$1(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6146,7 +6189,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6170,84 +6213,38 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
a: for (prevState = prevProps = current$$1; ; ) {
instance = prevState;
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(instance);
switch (instance.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = instance.updateQueue;
if (null !== updateQueue) {
var lastEffect = updateQueue.lastEffect;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
snapshot = firstEffect;
do {
var destroy = snapshot.destroy;
if (void 0 !== destroy) {
finishedWork$jscomp$0 = instance;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
finishedWork$jscomp$0,
error
);
}
}
snapshot = snapshot.next;
} while (snapshot !== firstEffect);
}
}
break;
case 1:
safelyDetachRef(instance);
var instance$jscomp$0 = instance.stateNode;
if (
"function" ===
typeof instance$jscomp$0.componentWillUnmount
)
try {
(instance$jscomp$0.props = instance.memoizedProps),
(instance$jscomp$0.state = instance.memoizedState),
instance$jscomp$0.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(instance, unmountError);
}
break;
case 5:
safelyDetachRef(instance);
break;
case 4:
createChildNodeSet(instance.stateNode.containerInfo);
}
if (null !== prevState.child)
(prevState.child.return = prevState),
(prevState = prevState.child);
prevProps = nextEffect;
a: for (
prevState = prevProps,
instance = current$$1,
snapshot = prevState;
;
)
if (
(commitUnmount(snapshot, instance), null !== snapshot.child)
)
(snapshot.child.return = snapshot),
(snapshot = snapshot.child);
else {
if (prevState === prevProps) break;
for (; null === prevState.sibling; ) {
if (snapshot === prevState) break;
for (; null === snapshot.sibling; ) {
if (
null === prevState.return ||
prevState.return === prevProps
null === snapshot.return ||
snapshot.return === prevState
)
break a;
prevState = prevState.return;
snapshot = snapshot.return;
}
prevState.sibling.return = prevState.return;
prevState = prevState.sibling;
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
}
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6285,10 +6282,10 @@ function commitRootImpl(root) {
);
break;
case 1:
var instance$jscomp$1 = current$$1$jscomp$0.stateNode;
var instance$jscomp$0 = current$$1$jscomp$0.stateNode;
if (current$$1$jscomp$0.effectTag & 4)
if (null === current$$1$jscomp$1)
instance$jscomp$1.componentDidMount();
instance$jscomp$0.componentDidMount();
else {
var prevProps$jscomp$0 =
current$$1$jscomp$0.elementType ===
@ -6298,38 +6295,38 @@ function commitRootImpl(root) {
current$$1$jscomp$0.type,
current$$1$jscomp$1.memoizedProps
);
instance$jscomp$1.componentDidUpdate(
instance$jscomp$0.componentDidUpdate(
prevProps$jscomp$0,
current$$1$jscomp$1.memoizedState,
instance$jscomp$1.__reactInternalSnapshotBeforeUpdate
instance$jscomp$0.__reactInternalSnapshotBeforeUpdate
);
}
var updateQueue$jscomp$0 = current$$1$jscomp$0.updateQueue;
null !== updateQueue$jscomp$0 &&
var updateQueue = current$$1$jscomp$0.updateQueue;
null !== updateQueue &&
commitUpdateQueue(
current$$1$jscomp$0,
updateQueue$jscomp$0,
instance$jscomp$1,
updateQueue,
instance$jscomp$0,
currentRef
);
break;
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
updateQueue = null;
alternate = null;
if (null !== current$$1$jscomp$0.child)
switch (current$$1$jscomp$0.child.tag) {
case 5:
updateQueue =
alternate =
current$$1$jscomp$0.child.stateNode.canonical;
break;
case 1:
updateQueue = current$$1$jscomp$0.child.stateNode;
alternate = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(
current$$1$jscomp$0,
_updateQueue,
updateQueue,
alternate,
currentRef
);
}
@ -6367,13 +6364,13 @@ function commitRootImpl(root) {
if (effectTag$jscomp$0 & 128) {
var ref = nextEffect.ref;
if (null !== ref) {
var instance$jscomp$2 = nextEffect.stateNode;
var instance$jscomp$1 = nextEffect.stateNode;
switch (nextEffect.tag) {
case 5:
var instanceToUse = instance$jscomp$2.canonical;
var instanceToUse = instance$jscomp$1.canonical;
break;
default:
instanceToUse = instance$jscomp$2;
instanceToUse = instance$jscomp$1;
}
"function" === typeof ref
? ref(instanceToUse)
@ -6395,24 +6392,27 @@ function commitRootImpl(root) {
executionContext = childExpirationTimeBeforeCommit;
} else root.current = finishedWork;
if (rootDoesHavePassiveEffects)
(rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root);
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(effectTag$jscomp$0 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = effectTag$jscomp$0);
effectTag$jscomp$0 = root.firstPendingTime;
0 !== effectTag$jscomp$0
? ((current$$1$jscomp$1 = requestCurrentTime()),
(current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
effectTag$jscomp$0
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
0 !== renderPriorityLevel
? ((effectTag$jscomp$0 = requestCurrentTime()),
(effectTag$jscomp$0 = inferPriorityFromExpirationTime(
effectTag$jscomp$0,
renderPriorityLevel
)),
scheduleCallbackForRoot(root, current$$1$jscomp$1, effectTag$jscomp$0))
scheduleCallbackForRoot(root, effectTag$jscomp$0, renderPriorityLevel))
: (legacyErrorBoundariesThatAlreadyFailed = null);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === effectTag$jscomp$0
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6428,8 +6428,18 @@ function commitRootImpl(root) {
}
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root) {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(
Error("Cannot flush passive effects while already rendering.")
@ -6587,32 +6597,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6631,25 +6635,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6658,8 +6662,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6670,9 +6674,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -6692,28 +6696,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6722,7 +6726,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6731,7 +6735,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6740,8 +6744,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -6750,7 +6754,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -6759,32 +6763,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6797,8 +6801,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -6807,7 +6811,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -6871,16 +6875,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6917,9 +6921,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -6933,7 +6937,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7015,7 +7019,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7023,12 +7027,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7040,16 +7047,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7067,11 +7074,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7084,13 +7091,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7204,7 +7211,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -2065,7 +2065,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3282,24 +3281,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3650,7 +3633,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3724,7 +3707,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3779,7 +3762,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
hydrationParentFiber = null,
nextHydratableInstance = null,
@ -3998,17 +3981,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -4932,6 +4915,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -4960,6 +4952,56 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = current$$1$jscomp$0.updateQueue;
if (
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var firstEffect = updateQueue.next;
runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@ -5078,6 +5120,8 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@ -5903,7 +5947,6 @@ function completeUnitOfWork(unitOfWork) {
: {
expirationTime: type.expirationTime,
firstContext: type.firstContext,
listeners: type.listeners,
responders: type.responders
})),
(renderExpirationTime$jscomp$0 =
@ -6035,16 +6078,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority$1(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority$1(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6146,7 +6189,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6170,84 +6213,38 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
a: for (prevState = prevProps = current$$1; ; ) {
instance = prevState;
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(instance);
switch (instance.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = instance.updateQueue;
if (null !== updateQueue) {
var lastEffect = updateQueue.lastEffect;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
snapshot = firstEffect;
do {
var destroy = snapshot.destroy;
if (void 0 !== destroy) {
finishedWork$jscomp$0 = instance;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
finishedWork$jscomp$0,
error
);
}
}
snapshot = snapshot.next;
} while (snapshot !== firstEffect);
}
}
break;
case 1:
safelyDetachRef(instance);
var instance$jscomp$0 = instance.stateNode;
if (
"function" ===
typeof instance$jscomp$0.componentWillUnmount
)
try {
(instance$jscomp$0.props = instance.memoizedProps),
(instance$jscomp$0.state = instance.memoizedState),
instance$jscomp$0.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(instance, unmountError);
}
break;
case 5:
safelyDetachRef(instance);
break;
case 4:
createChildNodeSet(instance.stateNode.containerInfo);
}
if (null !== prevState.child)
(prevState.child.return = prevState),
(prevState = prevState.child);
prevProps = nextEffect;
a: for (
prevState = prevProps,
instance = current$$1,
snapshot = prevState;
;
)
if (
(commitUnmount(snapshot, instance), null !== snapshot.child)
)
(snapshot.child.return = snapshot),
(snapshot = snapshot.child);
else {
if (prevState === prevProps) break;
for (; null === prevState.sibling; ) {
if (snapshot === prevState) break;
for (; null === snapshot.sibling; ) {
if (
null === prevState.return ||
prevState.return === prevProps
null === snapshot.return ||
snapshot.return === prevState
)
break a;
prevState = prevState.return;
snapshot = snapshot.return;
}
prevState.sibling.return = prevState.return;
prevState = prevState.sibling;
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
}
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6285,10 +6282,10 @@ function commitRootImpl(root) {
);
break;
case 1:
var instance$jscomp$1 = current$$1$jscomp$0.stateNode;
var instance$jscomp$0 = current$$1$jscomp$0.stateNode;
if (current$$1$jscomp$0.effectTag & 4)
if (null === current$$1$jscomp$1)
instance$jscomp$1.componentDidMount();
instance$jscomp$0.componentDidMount();
else {
var prevProps$jscomp$0 =
current$$1$jscomp$0.elementType ===
@ -6298,38 +6295,38 @@ function commitRootImpl(root) {
current$$1$jscomp$0.type,
current$$1$jscomp$1.memoizedProps
);
instance$jscomp$1.componentDidUpdate(
instance$jscomp$0.componentDidUpdate(
prevProps$jscomp$0,
current$$1$jscomp$1.memoizedState,
instance$jscomp$1.__reactInternalSnapshotBeforeUpdate
instance$jscomp$0.__reactInternalSnapshotBeforeUpdate
);
}
var updateQueue$jscomp$0 = current$$1$jscomp$0.updateQueue;
null !== updateQueue$jscomp$0 &&
var updateQueue = current$$1$jscomp$0.updateQueue;
null !== updateQueue &&
commitUpdateQueue(
current$$1$jscomp$0,
updateQueue$jscomp$0,
instance$jscomp$1,
updateQueue,
instance$jscomp$0,
currentRef
);
break;
case 3:
var _updateQueue = current$$1$jscomp$0.updateQueue;
if (null !== _updateQueue) {
updateQueue = null;
alternate = null;
if (null !== current$$1$jscomp$0.child)
switch (current$$1$jscomp$0.child.tag) {
case 5:
updateQueue =
alternate =
current$$1$jscomp$0.child.stateNode.canonical;
break;
case 1:
updateQueue = current$$1$jscomp$0.child.stateNode;
alternate = current$$1$jscomp$0.child.stateNode;
}
commitUpdateQueue(
current$$1$jscomp$0,
_updateQueue,
updateQueue,
alternate,
currentRef
);
}
@ -6367,13 +6364,13 @@ function commitRootImpl(root) {
if (effectTag$jscomp$0 & 128) {
var ref = nextEffect.ref;
if (null !== ref) {
var instance$jscomp$2 = nextEffect.stateNode;
var instance$jscomp$1 = nextEffect.stateNode;
switch (nextEffect.tag) {
case 5:
var instanceToUse = instance$jscomp$2.canonical;
var instanceToUse = instance$jscomp$1.canonical;
break;
default:
instanceToUse = instance$jscomp$2;
instanceToUse = instance$jscomp$1;
}
"function" === typeof ref
? ref(instanceToUse)
@ -6395,24 +6392,27 @@ function commitRootImpl(root) {
executionContext = childExpirationTimeBeforeCommit;
} else root.current = finishedWork;
if (rootDoesHavePassiveEffects)
(rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root);
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(effectTag$jscomp$0 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = effectTag$jscomp$0);
effectTag$jscomp$0 = root.firstPendingTime;
0 !== effectTag$jscomp$0
? ((current$$1$jscomp$1 = requestCurrentTime()),
(current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
effectTag$jscomp$0
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
0 !== renderPriorityLevel
? ((effectTag$jscomp$0 = requestCurrentTime()),
(effectTag$jscomp$0 = inferPriorityFromExpirationTime(
effectTag$jscomp$0,
renderPriorityLevel
)),
scheduleCallbackForRoot(root, current$$1$jscomp$1, effectTag$jscomp$0))
scheduleCallbackForRoot(root, effectTag$jscomp$0, renderPriorityLevel))
: (legacyErrorBoundariesThatAlreadyFailed = null);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === effectTag$jscomp$0
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6428,8 +6428,18 @@ function commitRootImpl(root) {
}
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root) {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(
Error("Cannot flush passive effects while already rendering.")
@ -6587,32 +6597,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6631,25 +6635,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6658,8 +6662,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6670,9 +6674,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -6692,28 +6696,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6722,7 +6726,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6731,7 +6735,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6740,8 +6744,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -6750,7 +6754,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -6759,32 +6763,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6797,8 +6801,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -6807,7 +6811,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -6871,16 +6875,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6917,9 +6921,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -6933,7 +6937,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7015,7 +7019,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7023,12 +7027,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7040,16 +7047,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7067,11 +7074,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7084,13 +7091,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7204,7 +7211,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -1103,6 +1103,7 @@ function getComponentName(type) {
}
return null;
}
require("../shims/ReactFeatureFlags");
function isFiberMountedImpl(fiber) {
var node = fiber;
if (fiber.alternate) for (; node.return; ) node = node.return;
@ -1452,7 +1453,6 @@ function restoreStateOfTarget(target) {
)
);
}
require("../shims/ReactFeatureFlags");
function batchedUpdatesImpl(fn, bookkeeping) {
return fn(bookkeeping);
}
@ -2075,7 +2075,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3292,24 +3291,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3660,7 +3643,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3734,7 +3717,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3789,7 +3772,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
now$1 = Scheduler.unstable_now,
commitTime = 0,
@ -4019,17 +4002,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -5105,7 +5088,6 @@ function completeWork(current, workInProgress, renderExpirationTime) {
: {
expirationTime: updatePayload.expirationTime,
firstContext: updatePayload.firstContext,
listeners: updatePayload.listeners,
responders: updatePayload.responders
}),
(rootContainerInstance.selfBaseDuration =
@ -5285,6 +5267,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -5313,6 +5304,56 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = current$$1$jscomp$0.updateQueue;
if (
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var firstEffect = updateQueue.next;
runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@ -5433,6 +5474,7 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
@ -6139,16 +6181,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority$1(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority$1(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6253,7 +6295,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6277,84 +6319,38 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
a: for (prevState = prevProps = current$$1; ; ) {
instance = prevState;
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(instance);
switch (instance.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = instance.updateQueue;
if (null !== updateQueue) {
var lastEffect = updateQueue.lastEffect;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
snapshot = firstEffect;
do {
var destroy = snapshot.destroy;
if (void 0 !== destroy) {
finishedWork$jscomp$0 = instance;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
finishedWork$jscomp$0,
error
);
}
}
snapshot = snapshot.next;
} while (snapshot !== firstEffect);
}
}
break;
case 1:
safelyDetachRef(instance);
var instance$jscomp$0 = instance.stateNode;
if (
"function" ===
typeof instance$jscomp$0.componentWillUnmount
)
try {
(instance$jscomp$0.props = instance.memoizedProps),
(instance$jscomp$0.state = instance.memoizedState),
instance$jscomp$0.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(instance, unmountError);
}
break;
case 5:
safelyDetachRef(instance);
break;
case 4:
createChildNodeSet(instance.stateNode.containerInfo);
}
if (null !== prevState.child)
(prevState.child.return = prevState),
(prevState = prevState.child);
prevProps = nextEffect;
a: for (
prevState = prevProps,
instance = current$$1,
snapshot = prevState;
;
)
if (
(commitUnmount(snapshot, instance), null !== snapshot.child)
)
(snapshot.child.return = snapshot),
(snapshot = snapshot.child);
else {
if (prevState === prevProps) break;
for (; null === prevState.sibling; ) {
if (snapshot === prevState) break;
for (; null === snapshot.sibling; ) {
if (
null === prevState.return ||
prevState.return === prevProps
null === snapshot.return ||
snapshot.return === prevState
)
break a;
prevState = prevState.return;
snapshot = snapshot.return;
}
prevState.sibling.return = prevState.return;
prevState = prevState.sibling;
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
}
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6382,10 +6378,10 @@ function commitRootImpl(root) {
) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
lastEffect = effectTag;
current$$1 = effectTag;
var current$$1$jscomp$1 = nextEffect.alternate;
currentRef = nextEffect;
updateQueue = current$$1$jscomp$0;
alternate = current$$1$jscomp$0;
switch (currentRef.tag) {
case 0:
case 11:
@ -6393,10 +6389,10 @@ function commitRootImpl(root) {
commitHookEffectList(UnmountLayout, MountLayout, currentRef);
break;
case 1:
var instance$jscomp$1 = currentRef.stateNode;
var instance$jscomp$0 = currentRef.stateNode;
if (currentRef.effectTag & 4)
if (null === current$$1$jscomp$1)
instance$jscomp$1.componentDidMount();
instance$jscomp$0.componentDidMount();
else {
var prevProps$jscomp$0 =
currentRef.elementType === currentRef.type
@ -6405,38 +6401,38 @@ function commitRootImpl(root) {
currentRef.type,
current$$1$jscomp$1.memoizedProps
);
instance$jscomp$1.componentDidUpdate(
instance$jscomp$0.componentDidUpdate(
prevProps$jscomp$0,
current$$1$jscomp$1.memoizedState,
instance$jscomp$1.__reactInternalSnapshotBeforeUpdate
instance$jscomp$0.__reactInternalSnapshotBeforeUpdate
);
}
var updateQueue$jscomp$0 = currentRef.updateQueue;
null !== updateQueue$jscomp$0 &&
var updateQueue = currentRef.updateQueue;
null !== updateQueue &&
commitUpdateQueue(
currentRef,
updateQueue$jscomp$0,
instance$jscomp$1,
updateQueue
updateQueue,
instance$jscomp$0,
alternate
);
break;
case 3:
var _updateQueue = currentRef.updateQueue;
if (null !== _updateQueue) {
lastEffect = null;
current$$1 = null;
if (null !== currentRef.child)
switch (currentRef.child.tag) {
case 5:
lastEffect = currentRef.child.stateNode.canonical;
current$$1 = currentRef.child.stateNode.canonical;
break;
case 1:
lastEffect = currentRef.child.stateNode;
current$$1 = currentRef.child.stateNode;
}
commitUpdateQueue(
currentRef,
_updateQueue,
lastEffect,
updateQueue
current$$1,
alternate
);
}
break;
@ -6462,7 +6458,7 @@ function commitRootImpl(root) {
currentRef.treeBaseDuration,
currentRef.actualStartTime,
commitTime,
lastEffect.memoizedInteractions
current$$1.memoizedInteractions
);
break;
case 13:
@ -6481,13 +6477,13 @@ function commitRootImpl(root) {
if (effectTag$jscomp$0 & 128) {
var ref = nextEffect.ref;
if (null !== ref) {
var instance$jscomp$2 = nextEffect.stateNode;
var instance$jscomp$1 = nextEffect.stateNode;
switch (nextEffect.tag) {
case 5:
var instanceToUse = instance$jscomp$2.canonical;
var instanceToUse = instance$jscomp$1.canonical;
break;
default:
instanceToUse = instance$jscomp$2;
instanceToUse = instance$jscomp$1;
}
"function" === typeof ref
? ref(instanceToUse)
@ -6512,38 +6508,39 @@ function commitRootImpl(root) {
if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime);
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(current$$1$jscomp$1 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = current$$1$jscomp$1);
current$$1$jscomp$1 = root.firstPendingTime;
if (0 !== current$$1$jscomp$1) {
instance$jscomp$1 = requestCurrentTime();
instance$jscomp$1 = inferPriorityFromExpirationTime(
instance$jscomp$1,
current$$1$jscomp$1
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
if (0 !== renderPriorityLevel) {
current$$1$jscomp$1 = requestCurrentTime();
current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
renderPriorityLevel
);
if (null !== spawnedWorkDuringRender)
for (
prevProps$jscomp$0 = spawnedWorkDuringRender,
instance$jscomp$0 = spawnedWorkDuringRender,
spawnedWorkDuringRender = null,
updateQueue$jscomp$0 = 0;
updateQueue$jscomp$0 < prevProps$jscomp$0.length;
updateQueue$jscomp$0++
prevProps$jscomp$0 = 0;
prevProps$jscomp$0 < instance$jscomp$0.length;
prevProps$jscomp$0++
)
scheduleInteractions(
root,
prevProps$jscomp$0[updateQueue$jscomp$0],
instance$jscomp$0[prevProps$jscomp$0],
root.memoizedInteractions
);
scheduleCallbackForRoot(root, instance$jscomp$1, current$$1$jscomp$1);
scheduleCallbackForRoot(root, current$$1$jscomp$1, renderPriorityLevel);
} else legacyErrorBoundariesThatAlreadyFailed = null;
effectTag$jscomp$0 || finishPendingInteractions(root, expirationTime);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === current$$1$jscomp$1
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6560,9 +6557,17 @@ function commitRootImpl(root) {
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime;
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root, expirationTime) {
var prevInteractions = tracing.__interactionsRef.current;
tracing.__interactionsRef.current = root.memoizedInteractions;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
@ -6727,32 +6732,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6771,25 +6770,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6798,8 +6797,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6810,9 +6809,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -6832,28 +6831,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6862,7 +6861,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6871,7 +6870,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6880,8 +6879,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -6890,7 +6889,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -6899,32 +6898,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6937,8 +6936,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -6947,7 +6946,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -7011,16 +7010,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7058,9 +7057,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -7074,7 +7073,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7156,7 +7155,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7164,12 +7163,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7181,16 +7183,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7208,11 +7210,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7225,13 +7227,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7437,7 +7439,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -2075,7 +2075,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3292,24 +3291,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3660,7 +3643,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3734,7 +3717,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3789,7 +3772,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
now$1 = Scheduler.unstable_now,
commitTime = 0,
@ -4019,17 +4002,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -5105,7 +5088,6 @@ function completeWork(current, workInProgress, renderExpirationTime) {
: {
expirationTime: updatePayload.expirationTime,
firstContext: updatePayload.firstContext,
listeners: updatePayload.listeners,
responders: updatePayload.responders
}),
(rootContainerInstance.selfBaseDuration =
@ -5285,6 +5267,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -5313,6 +5304,56 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = current$$1$jscomp$0.updateQueue;
if (
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var firstEffect = updateQueue.next;
runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
createChildNodeSet(current$$1$jscomp$0.stateNode.containerInfo);
}
}
function commitWork(current$$1, finishedWork) {
switch (finishedWork.tag) {
case 0:
@ -5433,6 +5474,7 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
@ -6139,16 +6181,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority$1(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority$1(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6253,7 +6295,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6277,84 +6319,38 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
a: for (prevState = prevProps = current$$1; ; ) {
instance = prevState;
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(instance);
switch (instance.tag) {
case 0:
case 11:
case 14:
case 15:
var updateQueue = instance.updateQueue;
if (null !== updateQueue) {
var lastEffect = updateQueue.lastEffect;
if (null !== lastEffect) {
var firstEffect = lastEffect.next;
snapshot = firstEffect;
do {
var destroy = snapshot.destroy;
if (void 0 !== destroy) {
finishedWork$jscomp$0 = instance;
try {
destroy();
} catch (error) {
captureCommitPhaseError(
finishedWork$jscomp$0,
error
);
}
}
snapshot = snapshot.next;
} while (snapshot !== firstEffect);
}
}
break;
case 1:
safelyDetachRef(instance);
var instance$jscomp$0 = instance.stateNode;
if (
"function" ===
typeof instance$jscomp$0.componentWillUnmount
)
try {
(instance$jscomp$0.props = instance.memoizedProps),
(instance$jscomp$0.state = instance.memoizedState),
instance$jscomp$0.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(instance, unmountError);
}
break;
case 5:
safelyDetachRef(instance);
break;
case 4:
createChildNodeSet(instance.stateNode.containerInfo);
}
if (null !== prevState.child)
(prevState.child.return = prevState),
(prevState = prevState.child);
prevProps = nextEffect;
a: for (
prevState = prevProps,
instance = current$$1,
snapshot = prevState;
;
)
if (
(commitUnmount(snapshot, instance), null !== snapshot.child)
)
(snapshot.child.return = snapshot),
(snapshot = snapshot.child);
else {
if (prevState === prevProps) break;
for (; null === prevState.sibling; ) {
if (snapshot === prevState) break;
for (; null === snapshot.sibling; ) {
if (
null === prevState.return ||
prevState.return === prevProps
null === snapshot.return ||
snapshot.return === prevState
)
break a;
prevState = prevState.return;
snapshot = snapshot.return;
}
prevState.sibling.return = prevState.return;
prevState = prevState.sibling;
snapshot.sibling.return = snapshot.return;
snapshot = snapshot.sibling;
}
}
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6382,10 +6378,10 @@ function commitRootImpl(root) {
) {
var effectTag$jscomp$0 = nextEffect.effectTag;
if (effectTag$jscomp$0 & 36) {
lastEffect = effectTag;
current$$1 = effectTag;
var current$$1$jscomp$1 = nextEffect.alternate;
currentRef = nextEffect;
updateQueue = current$$1$jscomp$0;
alternate = current$$1$jscomp$0;
switch (currentRef.tag) {
case 0:
case 11:
@ -6393,10 +6389,10 @@ function commitRootImpl(root) {
commitHookEffectList(UnmountLayout, MountLayout, currentRef);
break;
case 1:
var instance$jscomp$1 = currentRef.stateNode;
var instance$jscomp$0 = currentRef.stateNode;
if (currentRef.effectTag & 4)
if (null === current$$1$jscomp$1)
instance$jscomp$1.componentDidMount();
instance$jscomp$0.componentDidMount();
else {
var prevProps$jscomp$0 =
currentRef.elementType === currentRef.type
@ -6405,38 +6401,38 @@ function commitRootImpl(root) {
currentRef.type,
current$$1$jscomp$1.memoizedProps
);
instance$jscomp$1.componentDidUpdate(
instance$jscomp$0.componentDidUpdate(
prevProps$jscomp$0,
current$$1$jscomp$1.memoizedState,
instance$jscomp$1.__reactInternalSnapshotBeforeUpdate
instance$jscomp$0.__reactInternalSnapshotBeforeUpdate
);
}
var updateQueue$jscomp$0 = currentRef.updateQueue;
null !== updateQueue$jscomp$0 &&
var updateQueue = currentRef.updateQueue;
null !== updateQueue &&
commitUpdateQueue(
currentRef,
updateQueue$jscomp$0,
instance$jscomp$1,
updateQueue
updateQueue,
instance$jscomp$0,
alternate
);
break;
case 3:
var _updateQueue = currentRef.updateQueue;
if (null !== _updateQueue) {
lastEffect = null;
current$$1 = null;
if (null !== currentRef.child)
switch (currentRef.child.tag) {
case 5:
lastEffect = currentRef.child.stateNode.canonical;
current$$1 = currentRef.child.stateNode.canonical;
break;
case 1:
lastEffect = currentRef.child.stateNode;
current$$1 = currentRef.child.stateNode;
}
commitUpdateQueue(
currentRef,
_updateQueue,
lastEffect,
updateQueue
current$$1,
alternate
);
}
break;
@ -6462,7 +6458,7 @@ function commitRootImpl(root) {
currentRef.treeBaseDuration,
currentRef.actualStartTime,
commitTime,
lastEffect.memoizedInteractions
current$$1.memoizedInteractions
);
break;
case 13:
@ -6481,13 +6477,13 @@ function commitRootImpl(root) {
if (effectTag$jscomp$0 & 128) {
var ref = nextEffect.ref;
if (null !== ref) {
var instance$jscomp$2 = nextEffect.stateNode;
var instance$jscomp$1 = nextEffect.stateNode;
switch (nextEffect.tag) {
case 5:
var instanceToUse = instance$jscomp$2.canonical;
var instanceToUse = instance$jscomp$1.canonical;
break;
default:
instanceToUse = instance$jscomp$2;
instanceToUse = instance$jscomp$1;
}
"function" === typeof ref
? ref(instanceToUse)
@ -6512,38 +6508,39 @@ function commitRootImpl(root) {
if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime);
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(current$$1$jscomp$1 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = current$$1$jscomp$1);
current$$1$jscomp$1 = root.firstPendingTime;
if (0 !== current$$1$jscomp$1) {
instance$jscomp$1 = requestCurrentTime();
instance$jscomp$1 = inferPriorityFromExpirationTime(
instance$jscomp$1,
current$$1$jscomp$1
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
if (0 !== renderPriorityLevel) {
current$$1$jscomp$1 = requestCurrentTime();
current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
renderPriorityLevel
);
if (null !== spawnedWorkDuringRender)
for (
prevProps$jscomp$0 = spawnedWorkDuringRender,
instance$jscomp$0 = spawnedWorkDuringRender,
spawnedWorkDuringRender = null,
updateQueue$jscomp$0 = 0;
updateQueue$jscomp$0 < prevProps$jscomp$0.length;
updateQueue$jscomp$0++
prevProps$jscomp$0 = 0;
prevProps$jscomp$0 < instance$jscomp$0.length;
prevProps$jscomp$0++
)
scheduleInteractions(
root,
prevProps$jscomp$0[updateQueue$jscomp$0],
instance$jscomp$0[prevProps$jscomp$0],
root.memoizedInteractions
);
scheduleCallbackForRoot(root, instance$jscomp$1, current$$1$jscomp$1);
scheduleCallbackForRoot(root, current$$1$jscomp$1, renderPriorityLevel);
} else legacyErrorBoundariesThatAlreadyFailed = null;
effectTag$jscomp$0 || finishPendingInteractions(root, expirationTime);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === current$$1$jscomp$1
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6560,9 +6557,17 @@ function commitRootImpl(root) {
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime;
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority$1(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root, expirationTime) {
var prevInteractions = tracing.__interactionsRef.current;
tracing.__interactionsRef.current = root.memoizedInteractions;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
@ -6727,32 +6732,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6771,25 +6770,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6798,8 +6797,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6810,9 +6809,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -6832,28 +6831,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6862,7 +6861,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6871,7 +6870,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6880,8 +6879,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -6890,7 +6889,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -6899,32 +6898,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6937,8 +6936,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -6947,7 +6946,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -7011,16 +7010,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7058,9 +7057,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -7074,7 +7073,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7156,7 +7155,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7164,12 +7163,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7181,16 +7183,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7208,11 +7210,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7225,13 +7227,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7437,7 +7439,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1661,22 +1661,8 @@ function finalizeInitialChildren(parentInstance) {
return !1;
}
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout;
function removeChild(parentInstance, child) {
recursivelyUncacheFiberNode(child);
var children = parentInstance._children;
child = children.indexOf(child);
children.splice(child, 1);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance._nativeTag,
[],
[],
[],
[],
[child]
);
}
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
cancelTimeout = clearTimeout,
BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function getStackByFiberInDevAndProd(workInProgress) {
var info = "";
do {
@ -2070,7 +2056,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3287,24 +3272,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3655,7 +3624,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3729,7 +3698,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3784,7 +3753,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
hydrationParentFiber = null,
nextHydratableInstance = null,
@ -4003,17 +3972,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -4640,7 +4609,6 @@ var appendAllChildren = void 0,
appendAllChildren = function(parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
else if (20 === node.tag) parent._children.push(node.stateNode.instance);
else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
@ -4783,6 +4751,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -4811,7 +4788,7 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0) {
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
@ -4824,54 +4801,43 @@ function commitUnmount(current$$1$jscomp$0) {
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var effect = (updateQueue = updateQueue.next);
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
var firstEffect = updateQueue.next;
runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
effect = effect.next;
} while (effect !== updateQueue);
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
updateQueue = current$$1$jscomp$0.stateNode;
if ("function" === typeof updateQueue.componentWillUnmount)
try {
(updateQueue.props = current$$1$jscomp$0.memoizedProps),
(updateQueue.state = current$$1$jscomp$0.memoizedState),
updateQueue.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1$jscomp$0, unmountError);
}
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
unmountHostComponents(current$$1$jscomp$0);
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function commitNestedUnmounts(root) {
for (var node = root; ; )
if ((commitUnmount(node), null !== node.child && 4 !== node.tag))
(node.child.return = node), (node = node.child);
else {
if (node === root) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === root) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@ -4938,7 +4904,7 @@ function commitPlacement(finishedWork) {
}
for (var node = finishedWork; ; ) {
var isHost = 5 === node.tag || 6 === node.tag;
if (isHost || 20 === node.tag) {
if (isHost) {
var stateNode = isHost ? node.stateNode : node.stateNode.instance;
if (parentFiber)
if (isContainer) {
@ -5022,7 +4988,7 @@ function commitPlacement(finishedWork) {
node = node.sibling;
}
}
function unmountHostComponents(current$$1) {
function unmountHostComponents(current$$1, renderPriorityLevel$jscomp$0) {
for (
var node = current$$1,
currentParentIsValid = !1,
@ -5058,37 +5024,56 @@ function unmountHostComponents(current$$1) {
}
currentParentIsValid = !0;
}
if (5 === node.tag || 6 === node.tag)
if ((commitNestedUnmounts(node), currentParentIsContainer)) {
var parentInstance = currentParent;
recursivelyUncacheFiberNode(node.stateNode);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, node.stateNode);
else if (20 === node.tag)
if (
((parentInstance = node.stateNode.instance),
commitNestedUnmounts(node),
currentParentIsContainer)
) {
var parentInstance$jscomp$0 = currentParent;
recursivelyUncacheFiberNode(parentInstance);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance$jscomp$0,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, parentInstance);
else if (4 === node.tag) {
if (5 === node.tag || 6 === node.tag) {
a: for (
var root = node,
renderPriorityLevel = renderPriorityLevel$jscomp$0,
node$jscomp$0 = root;
;
)
if (
(commitUnmount(node$jscomp$0, renderPriorityLevel),
null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
)
(node$jscomp$0.child.return = node$jscomp$0),
(node$jscomp$0 = node$jscomp$0.child);
else {
if (node$jscomp$0 === root) break;
for (; null === node$jscomp$0.sibling; ) {
if (null === node$jscomp$0.return || node$jscomp$0.return === root)
break a;
node$jscomp$0 = node$jscomp$0.return;
}
node$jscomp$0.sibling.return = node$jscomp$0.return;
node$jscomp$0 = node$jscomp$0.sibling;
}
currentParentIsContainer
? ((root = currentParent),
recursivelyUncacheFiberNode(node.stateNode),
ReactNativePrivateInterface.UIManager.manageChildren(
root,
[],
[],
[],
[],
[0]
))
: ((root = currentParent),
(node$jscomp$0 = node.stateNode),
recursivelyUncacheFiberNode(node$jscomp$0),
(renderPriorityLevel = root._children),
(node$jscomp$0 = renderPriorityLevel.indexOf(node$jscomp$0)),
renderPriorityLevel.splice(node$jscomp$0, 1),
ReactNativePrivateInterface.UIManager.manageChildren(
root._nativeTag,
[],
[],
[],
[],
[node$jscomp$0]
));
} else if (4 === node.tag) {
if (null !== node.child) {
currentParent = node.stateNode.containerInfo;
currentParentIsContainer = !0;
@ -5096,7 +5081,9 @@ function unmountHostComponents(current$$1) {
node = node.child;
continue;
}
} else if ((commitUnmount(node), null !== node.child)) {
} else if (
(commitUnmount(node, renderPriorityLevel$jscomp$0), null !== node.child)
) {
node.child.return = node;
node = node.child;
continue;
@ -5325,6 +5312,8 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@ -5958,7 +5947,7 @@ function completeUnitOfWork(unitOfWork) {
else if (newProps) {
current = requiredContext(contextStackCursor$1.current);
var type$jscomp$0 = type;
var _instance5 = newProps;
var _instance6 = newProps;
var rootContainerInstance = renderExpirationTime$jscomp$0,
internalInstanceHandle = current$$1,
tag = allocateTag();
@ -5966,7 +5955,7 @@ function completeUnitOfWork(unitOfWork) {
var updatePayload = diffProperties(
null,
emptyObject,
_instance5,
_instance6,
type$jscomp$0.validAttributes
);
ReactNativePrivateInterface.UIManager.createView(
@ -5980,17 +5969,17 @@ function completeUnitOfWork(unitOfWork) {
type$jscomp$0
);
instanceCache.set(tag, internalInstanceHandle);
instanceProps.set(tag, _instance5);
_instance5 = rootContainerInstance;
appendAllChildren(_instance5, current$$1, !1, !1);
instanceProps.set(tag, _instance6);
_instance6 = rootContainerInstance;
appendAllChildren(_instance6, current$$1, !1, !1);
finalizeInitialChildren(
_instance5,
_instance6,
type,
newProps,
renderExpirationTime$jscomp$0,
current
) && (current$$1.effectTag |= 4);
current$$1.stateNode = _instance5;
current$$1.stateNode = _instance6;
null !== current$$1.ref && (current$$1.effectTag |= 128);
} else if (null === current$$1.stateNode)
throw ReactError(
@ -6054,10 +6043,10 @@ function completeUnitOfWork(unitOfWork) {
null === type ||
((type = current.child.sibling),
null !== type &&
((_instance5 = current$$1.firstEffect),
null !== _instance5
((_instance6 = current$$1.firstEffect),
null !== _instance6
? ((current$$1.firstEffect = type),
(type.nextEffect = _instance5))
(type.nextEffect = _instance6))
: ((current$$1.firstEffect = current$$1.lastEffect = type),
(type.nextEffect = null)),
(type.effectTag = 8))));
@ -6109,8 +6098,8 @@ function completeUnitOfWork(unitOfWork) {
newProps = current$$1.memoizedState;
if (null === newProps) break;
type = 0 !== (current$$1.effectTag & 64);
_instance5 = newProps.rendering;
if (null === _instance5)
_instance6 = newProps.rendering;
if (null === _instance6)
if (type) cutOffTailIfNeeded(newProps, !1);
else {
if (
@ -6118,11 +6107,11 @@ function completeUnitOfWork(unitOfWork) {
(null !== current && 0 !== (current.effectTag & 64))
)
for (current = current$$1.child; null !== current; ) {
_instance5 = findFirstSuspended(current);
if (null !== _instance5) {
_instance6 = findFirstSuspended(current);
if (null !== _instance6) {
current$$1.effectTag |= 64;
cutOffTailIfNeeded(newProps, !1);
newProps = _instance5.updateQueue;
newProps = _instance6.updateQueue;
null !== newProps &&
((current$$1.updateQueue = newProps),
(current$$1.effectTag |= 4));
@ -6135,9 +6124,9 @@ function completeUnitOfWork(unitOfWork) {
(renderExpirationTime$jscomp$0.nextEffect = null),
(renderExpirationTime$jscomp$0.firstEffect = null),
(renderExpirationTime$jscomp$0.lastEffect = null),
(_instance5 =
(_instance6 =
renderExpirationTime$jscomp$0.alternate),
null === _instance5
null === _instance6
? ((renderExpirationTime$jscomp$0.childExpirationTime = 0),
(renderExpirationTime$jscomp$0.expirationTime = type),
(renderExpirationTime$jscomp$0.child = null),
@ -6146,25 +6135,24 @@ function completeUnitOfWork(unitOfWork) {
(renderExpirationTime$jscomp$0.updateQueue = null),
(renderExpirationTime$jscomp$0.dependencies = null))
: ((renderExpirationTime$jscomp$0.childExpirationTime =
_instance5.childExpirationTime),
_instance6.childExpirationTime),
(renderExpirationTime$jscomp$0.expirationTime =
_instance5.expirationTime),
_instance6.expirationTime),
(renderExpirationTime$jscomp$0.child =
_instance5.child),
_instance6.child),
(renderExpirationTime$jscomp$0.memoizedProps =
_instance5.memoizedProps),
_instance6.memoizedProps),
(renderExpirationTime$jscomp$0.memoizedState =
_instance5.memoizedState),
_instance6.memoizedState),
(renderExpirationTime$jscomp$0.updateQueue =
_instance5.updateQueue),
(type = _instance5.dependencies),
_instance6.updateQueue),
(type = _instance6.dependencies),
(renderExpirationTime$jscomp$0.dependencies =
null === type
? null
: {
expirationTime: type.expirationTime,
firstContext: type.firstContext,
listeners: type.listeners,
responders: type.responders
})),
(current = current.sibling);
@ -6184,7 +6172,7 @@ function completeUnitOfWork(unitOfWork) {
else {
if (!type)
if (
((current = findFirstSuspended(_instance5)), null !== current)
((current = findFirstSuspended(_instance6)), null !== current)
) {
if (
((current$$1.effectTag |= 64),
@ -6209,13 +6197,13 @@ function completeUnitOfWork(unitOfWork) {
(current$$1.expirationTime = current$$1.childExpirationTime =
renderExpirationTime$jscomp$0 - 1));
newProps.isBackwards
? ((_instance5.sibling = current$$1.child),
(current$$1.child = _instance5))
? ((_instance6.sibling = current$$1.child),
(current$$1.child = _instance6))
: ((current = newProps.last),
null !== current
? (current.sibling = _instance5)
: (current$$1.child = _instance5),
(newProps.last = _instance5));
? (current.sibling = _instance6)
: (current$$1.child = _instance6),
(newProps.last = _instance6));
}
if (null !== newProps.tail) {
0 === newProps.tailExpiration &&
@ -6255,9 +6243,9 @@ function completeUnitOfWork(unitOfWork) {
)
(type = renderExpirationTime$jscomp$0.expirationTime),
(_instance5 = renderExpirationTime$jscomp$0.childExpirationTime),
(_instance6 = renderExpirationTime$jscomp$0.childExpirationTime),
type > current && (current = type),
_instance5 > current && (current = _instance5),
_instance6 > current && (current = _instance6),
(renderExpirationTime$jscomp$0 =
renderExpirationTime$jscomp$0.sibling);
newProps.childExpirationTime = current;
@ -6293,16 +6281,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6404,7 +6392,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6430,14 +6418,14 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
unmountHostComponents(current$$1);
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6575,24 +6563,27 @@ function commitRootImpl(root) {
executionContext = childExpirationTimeBeforeCommit;
} else root.current = finishedWork;
if (rootDoesHavePassiveEffects)
(rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root);
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(effectTag$jscomp$0 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = effectTag$jscomp$0);
effectTag$jscomp$0 = root.firstPendingTime;
0 !== effectTag$jscomp$0
? ((current$$1$jscomp$1 = requestCurrentTime()),
(current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
effectTag$jscomp$0
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
0 !== renderPriorityLevel
? ((effectTag$jscomp$0 = requestCurrentTime()),
(effectTag$jscomp$0 = inferPriorityFromExpirationTime(
effectTag$jscomp$0,
renderPriorityLevel
)),
scheduleCallbackForRoot(root, current$$1$jscomp$1, effectTag$jscomp$0))
scheduleCallbackForRoot(root, effectTag$jscomp$0, renderPriorityLevel))
: (legacyErrorBoundariesThatAlreadyFailed = null);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === effectTag$jscomp$0
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6608,8 +6599,18 @@ function commitRootImpl(root) {
}
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root) {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(
Error("Cannot flush passive effects while already rendering.")
@ -6767,32 +6768,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6811,25 +6806,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6838,8 +6833,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6850,9 +6845,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -6872,28 +6867,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6902,7 +6897,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6911,7 +6906,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6920,8 +6915,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -6930,7 +6925,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -6939,32 +6934,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6977,8 +6972,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -6987,7 +6982,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -7051,16 +7046,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7097,9 +7092,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -7113,7 +7108,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7195,7 +7190,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7203,12 +7198,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7220,16 +7218,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7247,11 +7245,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7264,13 +7262,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7384,7 +7382,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -1661,22 +1661,8 @@ function finalizeInitialChildren(parentInstance) {
return !1;
}
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout;
function removeChild(parentInstance, child) {
recursivelyUncacheFiberNode(child);
var children = parentInstance._children;
child = children.indexOf(child);
children.splice(child, 1);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance._nativeTag,
[],
[],
[],
[],
[child]
);
}
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
cancelTimeout = clearTimeout,
BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function getStackByFiberInDevAndProd(workInProgress) {
var info = "";
do {
@ -2070,7 +2056,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3287,24 +3272,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3655,7 +3624,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3729,7 +3698,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3784,7 +3753,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
hydrationParentFiber = null,
nextHydratableInstance = null,
@ -4003,17 +3972,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -4640,7 +4609,6 @@ var appendAllChildren = void 0,
appendAllChildren = function(parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
else if (20 === node.tag) parent._children.push(node.stateNode.instance);
else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
@ -4783,6 +4751,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -4811,7 +4788,7 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0) {
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
@ -4824,54 +4801,43 @@ function commitUnmount(current$$1$jscomp$0) {
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var effect = (updateQueue = updateQueue.next);
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
var firstEffect = updateQueue.next;
runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
effect = effect.next;
} while (effect !== updateQueue);
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
updateQueue = current$$1$jscomp$0.stateNode;
if ("function" === typeof updateQueue.componentWillUnmount)
try {
(updateQueue.props = current$$1$jscomp$0.memoizedProps),
(updateQueue.state = current$$1$jscomp$0.memoizedState),
updateQueue.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1$jscomp$0, unmountError);
}
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
unmountHostComponents(current$$1$jscomp$0);
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function commitNestedUnmounts(root) {
for (var node = root; ; )
if ((commitUnmount(node), null !== node.child && 4 !== node.tag))
(node.child.return = node), (node = node.child);
else {
if (node === root) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === root) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@ -4938,7 +4904,7 @@ function commitPlacement(finishedWork) {
}
for (var node = finishedWork; ; ) {
var isHost = 5 === node.tag || 6 === node.tag;
if (isHost || 20 === node.tag) {
if (isHost) {
var stateNode = isHost ? node.stateNode : node.stateNode.instance;
if (parentFiber)
if (isContainer) {
@ -5022,7 +4988,7 @@ function commitPlacement(finishedWork) {
node = node.sibling;
}
}
function unmountHostComponents(current$$1) {
function unmountHostComponents(current$$1, renderPriorityLevel$jscomp$0) {
for (
var node = current$$1,
currentParentIsValid = !1,
@ -5058,37 +5024,56 @@ function unmountHostComponents(current$$1) {
}
currentParentIsValid = !0;
}
if (5 === node.tag || 6 === node.tag)
if ((commitNestedUnmounts(node), currentParentIsContainer)) {
var parentInstance = currentParent;
recursivelyUncacheFiberNode(node.stateNode);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, node.stateNode);
else if (20 === node.tag)
if (
((parentInstance = node.stateNode.instance),
commitNestedUnmounts(node),
currentParentIsContainer)
) {
var parentInstance$jscomp$0 = currentParent;
recursivelyUncacheFiberNode(parentInstance);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance$jscomp$0,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, parentInstance);
else if (4 === node.tag) {
if (5 === node.tag || 6 === node.tag) {
a: for (
var root = node,
renderPriorityLevel = renderPriorityLevel$jscomp$0,
node$jscomp$0 = root;
;
)
if (
(commitUnmount(node$jscomp$0, renderPriorityLevel),
null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
)
(node$jscomp$0.child.return = node$jscomp$0),
(node$jscomp$0 = node$jscomp$0.child);
else {
if (node$jscomp$0 === root) break;
for (; null === node$jscomp$0.sibling; ) {
if (null === node$jscomp$0.return || node$jscomp$0.return === root)
break a;
node$jscomp$0 = node$jscomp$0.return;
}
node$jscomp$0.sibling.return = node$jscomp$0.return;
node$jscomp$0 = node$jscomp$0.sibling;
}
currentParentIsContainer
? ((root = currentParent),
recursivelyUncacheFiberNode(node.stateNode),
ReactNativePrivateInterface.UIManager.manageChildren(
root,
[],
[],
[],
[],
[0]
))
: ((root = currentParent),
(node$jscomp$0 = node.stateNode),
recursivelyUncacheFiberNode(node$jscomp$0),
(renderPriorityLevel = root._children),
(node$jscomp$0 = renderPriorityLevel.indexOf(node$jscomp$0)),
renderPriorityLevel.splice(node$jscomp$0, 1),
ReactNativePrivateInterface.UIManager.manageChildren(
root._nativeTag,
[],
[],
[],
[],
[node$jscomp$0]
));
} else if (4 === node.tag) {
if (null !== node.child) {
currentParent = node.stateNode.containerInfo;
currentParentIsContainer = !0;
@ -5096,7 +5081,9 @@ function unmountHostComponents(current$$1) {
node = node.child;
continue;
}
} else if ((commitUnmount(node), null !== node.child)) {
} else if (
(commitUnmount(node, renderPriorityLevel$jscomp$0), null !== node.child)
) {
node.child.return = node;
node = node.child;
continue;
@ -5325,6 +5312,8 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
rootWithNestedUpdates = null,
@ -5958,7 +5947,7 @@ function completeUnitOfWork(unitOfWork) {
else if (newProps) {
current = requiredContext(contextStackCursor$1.current);
var type$jscomp$0 = type;
var _instance5 = newProps;
var _instance6 = newProps;
var rootContainerInstance = renderExpirationTime$jscomp$0,
internalInstanceHandle = current$$1,
tag = allocateTag();
@ -5966,7 +5955,7 @@ function completeUnitOfWork(unitOfWork) {
var updatePayload = diffProperties(
null,
emptyObject,
_instance5,
_instance6,
type$jscomp$0.validAttributes
);
ReactNativePrivateInterface.UIManager.createView(
@ -5980,17 +5969,17 @@ function completeUnitOfWork(unitOfWork) {
type$jscomp$0
);
instanceCache.set(tag, internalInstanceHandle);
instanceProps.set(tag, _instance5);
_instance5 = rootContainerInstance;
appendAllChildren(_instance5, current$$1, !1, !1);
instanceProps.set(tag, _instance6);
_instance6 = rootContainerInstance;
appendAllChildren(_instance6, current$$1, !1, !1);
finalizeInitialChildren(
_instance5,
_instance6,
type,
newProps,
renderExpirationTime$jscomp$0,
current
) && (current$$1.effectTag |= 4);
current$$1.stateNode = _instance5;
current$$1.stateNode = _instance6;
null !== current$$1.ref && (current$$1.effectTag |= 128);
} else if (null === current$$1.stateNode)
throw ReactError(
@ -6054,10 +6043,10 @@ function completeUnitOfWork(unitOfWork) {
null === type ||
((type = current.child.sibling),
null !== type &&
((_instance5 = current$$1.firstEffect),
null !== _instance5
((_instance6 = current$$1.firstEffect),
null !== _instance6
? ((current$$1.firstEffect = type),
(type.nextEffect = _instance5))
(type.nextEffect = _instance6))
: ((current$$1.firstEffect = current$$1.lastEffect = type),
(type.nextEffect = null)),
(type.effectTag = 8))));
@ -6109,8 +6098,8 @@ function completeUnitOfWork(unitOfWork) {
newProps = current$$1.memoizedState;
if (null === newProps) break;
type = 0 !== (current$$1.effectTag & 64);
_instance5 = newProps.rendering;
if (null === _instance5)
_instance6 = newProps.rendering;
if (null === _instance6)
if (type) cutOffTailIfNeeded(newProps, !1);
else {
if (
@ -6118,11 +6107,11 @@ function completeUnitOfWork(unitOfWork) {
(null !== current && 0 !== (current.effectTag & 64))
)
for (current = current$$1.child; null !== current; ) {
_instance5 = findFirstSuspended(current);
if (null !== _instance5) {
_instance6 = findFirstSuspended(current);
if (null !== _instance6) {
current$$1.effectTag |= 64;
cutOffTailIfNeeded(newProps, !1);
newProps = _instance5.updateQueue;
newProps = _instance6.updateQueue;
null !== newProps &&
((current$$1.updateQueue = newProps),
(current$$1.effectTag |= 4));
@ -6135,9 +6124,9 @@ function completeUnitOfWork(unitOfWork) {
(renderExpirationTime$jscomp$0.nextEffect = null),
(renderExpirationTime$jscomp$0.firstEffect = null),
(renderExpirationTime$jscomp$0.lastEffect = null),
(_instance5 =
(_instance6 =
renderExpirationTime$jscomp$0.alternate),
null === _instance5
null === _instance6
? ((renderExpirationTime$jscomp$0.childExpirationTime = 0),
(renderExpirationTime$jscomp$0.expirationTime = type),
(renderExpirationTime$jscomp$0.child = null),
@ -6146,25 +6135,24 @@ function completeUnitOfWork(unitOfWork) {
(renderExpirationTime$jscomp$0.updateQueue = null),
(renderExpirationTime$jscomp$0.dependencies = null))
: ((renderExpirationTime$jscomp$0.childExpirationTime =
_instance5.childExpirationTime),
_instance6.childExpirationTime),
(renderExpirationTime$jscomp$0.expirationTime =
_instance5.expirationTime),
_instance6.expirationTime),
(renderExpirationTime$jscomp$0.child =
_instance5.child),
_instance6.child),
(renderExpirationTime$jscomp$0.memoizedProps =
_instance5.memoizedProps),
_instance6.memoizedProps),
(renderExpirationTime$jscomp$0.memoizedState =
_instance5.memoizedState),
_instance6.memoizedState),
(renderExpirationTime$jscomp$0.updateQueue =
_instance5.updateQueue),
(type = _instance5.dependencies),
_instance6.updateQueue),
(type = _instance6.dependencies),
(renderExpirationTime$jscomp$0.dependencies =
null === type
? null
: {
expirationTime: type.expirationTime,
firstContext: type.firstContext,
listeners: type.listeners,
responders: type.responders
})),
(current = current.sibling);
@ -6184,7 +6172,7 @@ function completeUnitOfWork(unitOfWork) {
else {
if (!type)
if (
((current = findFirstSuspended(_instance5)), null !== current)
((current = findFirstSuspended(_instance6)), null !== current)
) {
if (
((current$$1.effectTag |= 64),
@ -6209,13 +6197,13 @@ function completeUnitOfWork(unitOfWork) {
(current$$1.expirationTime = current$$1.childExpirationTime =
renderExpirationTime$jscomp$0 - 1));
newProps.isBackwards
? ((_instance5.sibling = current$$1.child),
(current$$1.child = _instance5))
? ((_instance6.sibling = current$$1.child),
(current$$1.child = _instance6))
: ((current = newProps.last),
null !== current
? (current.sibling = _instance5)
: (current$$1.child = _instance5),
(newProps.last = _instance5));
? (current.sibling = _instance6)
: (current$$1.child = _instance6),
(newProps.last = _instance6));
}
if (null !== newProps.tail) {
0 === newProps.tailExpiration &&
@ -6255,9 +6243,9 @@ function completeUnitOfWork(unitOfWork) {
)
(type = renderExpirationTime$jscomp$0.expirationTime),
(_instance5 = renderExpirationTime$jscomp$0.childExpirationTime),
(_instance6 = renderExpirationTime$jscomp$0.childExpirationTime),
type > current && (current = type),
_instance5 > current && (current = _instance5),
_instance6 > current && (current = _instance6),
(renderExpirationTime$jscomp$0 =
renderExpirationTime$jscomp$0.sibling);
newProps.childExpirationTime = current;
@ -6293,16 +6281,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6404,7 +6392,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6430,14 +6418,14 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
unmountHostComponents(current$$1);
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6575,24 +6563,27 @@ function commitRootImpl(root) {
executionContext = childExpirationTimeBeforeCommit;
} else root.current = finishedWork;
if (rootDoesHavePassiveEffects)
(rootDoesHavePassiveEffects = !1), (rootWithPendingPassiveEffects = root);
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(effectTag$jscomp$0 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = effectTag$jscomp$0);
effectTag$jscomp$0 = root.firstPendingTime;
0 !== effectTag$jscomp$0
? ((current$$1$jscomp$1 = requestCurrentTime()),
(current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
effectTag$jscomp$0
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
0 !== renderPriorityLevel
? ((effectTag$jscomp$0 = requestCurrentTime()),
(effectTag$jscomp$0 = inferPriorityFromExpirationTime(
effectTag$jscomp$0,
renderPriorityLevel
)),
scheduleCallbackForRoot(root, current$$1$jscomp$1, effectTag$jscomp$0))
scheduleCallbackForRoot(root, effectTag$jscomp$0, renderPriorityLevel))
: (legacyErrorBoundariesThatAlreadyFailed = null);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === effectTag$jscomp$0
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6608,8 +6599,18 @@ function commitRootImpl(root) {
}
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root) {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(
Error("Cannot flush passive effects while already rendering.")
@ -6767,32 +6768,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6811,25 +6806,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6838,8 +6833,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6850,9 +6845,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -6872,28 +6867,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6902,7 +6897,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6911,7 +6906,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -6920,8 +6915,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -6930,7 +6925,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -6939,32 +6934,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -6977,8 +6972,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -6987,7 +6982,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -7051,16 +7046,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7097,9 +7092,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -7113,7 +7108,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7195,7 +7190,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7203,12 +7198,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7220,16 +7218,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7247,11 +7245,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7264,13 +7262,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7384,7 +7382,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -1662,22 +1662,8 @@ function finalizeInitialChildren(parentInstance) {
return !1;
}
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout;
function removeChild(parentInstance, child) {
recursivelyUncacheFiberNode(child);
var children = parentInstance._children;
child = children.indexOf(child);
children.splice(child, 1);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance._nativeTag,
[],
[],
[],
[],
[child]
);
}
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
cancelTimeout = clearTimeout,
BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function getStackByFiberInDevAndProd(workInProgress) {
var info = "";
do {
@ -2080,7 +2066,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3297,24 +3282,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3665,7 +3634,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3739,7 +3708,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3794,7 +3763,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
now$1 = Scheduler.unstable_now,
commitTime = 0,
@ -4024,17 +3993,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -4684,7 +4653,6 @@ var appendAllChildren = void 0,
appendAllChildren = function(parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
else if (20 === node.tag) parent._children.push(node.stateNode.instance);
else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
@ -4963,7 +4931,6 @@ function completeWork(current, workInProgress, renderExpirationTime) {
: {
expirationTime: tag.expirationTime,
firstContext: tag.firstContext,
listeners: tag.listeners,
responders: tag.responders
}),
(rootContainerInstance.selfBaseDuration =
@ -5140,6 +5107,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -5168,7 +5144,7 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0) {
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
@ -5181,54 +5157,43 @@ function commitUnmount(current$$1$jscomp$0) {
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var effect = (updateQueue = updateQueue.next);
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
var firstEffect = updateQueue.next;
runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
effect = effect.next;
} while (effect !== updateQueue);
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
updateQueue = current$$1$jscomp$0.stateNode;
if ("function" === typeof updateQueue.componentWillUnmount)
try {
(updateQueue.props = current$$1$jscomp$0.memoizedProps),
(updateQueue.state = current$$1$jscomp$0.memoizedState),
updateQueue.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1$jscomp$0, unmountError);
}
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
unmountHostComponents(current$$1$jscomp$0);
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function commitNestedUnmounts(root) {
for (var node = root; ; )
if ((commitUnmount(node), null !== node.child && 4 !== node.tag))
(node.child.return = node), (node = node.child);
else {
if (node === root) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === root) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@ -5295,7 +5260,7 @@ function commitPlacement(finishedWork) {
}
for (var node = finishedWork; ; ) {
var isHost = 5 === node.tag || 6 === node.tag;
if (isHost || 20 === node.tag) {
if (isHost) {
var stateNode = isHost ? node.stateNode : node.stateNode.instance;
if (parentFiber)
if (isContainer) {
@ -5379,7 +5344,7 @@ function commitPlacement(finishedWork) {
node = node.sibling;
}
}
function unmountHostComponents(current$$1) {
function unmountHostComponents(current$$1, renderPriorityLevel$jscomp$0) {
for (
var node = current$$1,
currentParentIsValid = !1,
@ -5415,37 +5380,56 @@ function unmountHostComponents(current$$1) {
}
currentParentIsValid = !0;
}
if (5 === node.tag || 6 === node.tag)
if ((commitNestedUnmounts(node), currentParentIsContainer)) {
var parentInstance = currentParent;
recursivelyUncacheFiberNode(node.stateNode);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, node.stateNode);
else if (20 === node.tag)
if (
((parentInstance = node.stateNode.instance),
commitNestedUnmounts(node),
currentParentIsContainer)
) {
var parentInstance$jscomp$0 = currentParent;
recursivelyUncacheFiberNode(parentInstance);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance$jscomp$0,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, parentInstance);
else if (4 === node.tag) {
if (5 === node.tag || 6 === node.tag) {
a: for (
var root = node,
renderPriorityLevel = renderPriorityLevel$jscomp$0,
node$jscomp$0 = root;
;
)
if (
(commitUnmount(node$jscomp$0, renderPriorityLevel),
null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
)
(node$jscomp$0.child.return = node$jscomp$0),
(node$jscomp$0 = node$jscomp$0.child);
else {
if (node$jscomp$0 === root) break;
for (; null === node$jscomp$0.sibling; ) {
if (null === node$jscomp$0.return || node$jscomp$0.return === root)
break a;
node$jscomp$0 = node$jscomp$0.return;
}
node$jscomp$0.sibling.return = node$jscomp$0.return;
node$jscomp$0 = node$jscomp$0.sibling;
}
currentParentIsContainer
? ((root = currentParent),
recursivelyUncacheFiberNode(node.stateNode),
ReactNativePrivateInterface.UIManager.manageChildren(
root,
[],
[],
[],
[],
[0]
))
: ((root = currentParent),
(node$jscomp$0 = node.stateNode),
recursivelyUncacheFiberNode(node$jscomp$0),
(renderPriorityLevel = root._children),
(node$jscomp$0 = renderPriorityLevel.indexOf(node$jscomp$0)),
renderPriorityLevel.splice(node$jscomp$0, 1),
ReactNativePrivateInterface.UIManager.manageChildren(
root._nativeTag,
[],
[],
[],
[],
[node$jscomp$0]
));
} else if (4 === node.tag) {
if (null !== node.child) {
currentParent = node.stateNode.containerInfo;
currentParentIsContainer = !0;
@ -5453,7 +5437,9 @@ function unmountHostComponents(current$$1) {
node = node.child;
continue;
}
} else if ((commitUnmount(node), null !== node.child)) {
} else if (
(commitUnmount(node, renderPriorityLevel$jscomp$0), null !== node.child)
) {
node.child.return = node;
node = node.child;
continue;
@ -5684,6 +5670,7 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
@ -6390,16 +6377,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6504,7 +6491,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6530,14 +6517,14 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
unmountHostComponents(current$$1);
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6689,38 +6676,39 @@ function commitRootImpl(root) {
if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime);
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(current$$1$jscomp$1 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = current$$1$jscomp$1);
current$$1$jscomp$1 = root.firstPendingTime;
if (0 !== current$$1$jscomp$1) {
instance$jscomp$0 = requestCurrentTime();
instance$jscomp$0 = inferPriorityFromExpirationTime(
instance$jscomp$0,
current$$1$jscomp$1
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
if (0 !== renderPriorityLevel) {
current$$1$jscomp$1 = requestCurrentTime();
current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
renderPriorityLevel
);
if (null !== spawnedWorkDuringRender)
for (
prevProps$jscomp$0 = spawnedWorkDuringRender,
instance$jscomp$0 = spawnedWorkDuringRender,
spawnedWorkDuringRender = null,
updateQueue = 0;
updateQueue < prevProps$jscomp$0.length;
updateQueue++
prevProps$jscomp$0 = 0;
prevProps$jscomp$0 < instance$jscomp$0.length;
prevProps$jscomp$0++
)
scheduleInteractions(
root,
prevProps$jscomp$0[updateQueue],
instance$jscomp$0[prevProps$jscomp$0],
root.memoizedInteractions
);
scheduleCallbackForRoot(root, instance$jscomp$0, current$$1$jscomp$1);
scheduleCallbackForRoot(root, current$$1$jscomp$1, renderPriorityLevel);
} else legacyErrorBoundariesThatAlreadyFailed = null;
effectTag$jscomp$0 || finishPendingInteractions(root, expirationTime);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === current$$1$jscomp$1
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6737,9 +6725,17 @@ function commitRootImpl(root) {
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime;
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root, expirationTime) {
var prevInteractions = tracing.__interactionsRef.current;
tracing.__interactionsRef.current = root.memoizedInteractions;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
@ -6904,32 +6900,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6948,25 +6938,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6975,8 +6965,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6987,9 +6977,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -7009,28 +6999,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -7039,7 +7029,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -7048,7 +7038,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -7057,8 +7047,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -7067,7 +7057,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -7076,32 +7066,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7114,8 +7104,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -7124,7 +7114,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -7188,16 +7178,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7235,9 +7225,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -7251,7 +7241,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7333,7 +7323,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7341,12 +7331,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7358,16 +7351,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7385,11 +7378,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7402,13 +7395,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7614,7 +7607,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -1662,22 +1662,8 @@ function finalizeInitialChildren(parentInstance) {
return !1;
}
var scheduleTimeout = setTimeout,
cancelTimeout = clearTimeout;
function removeChild(parentInstance, child) {
recursivelyUncacheFiberNode(child);
var children = parentInstance._children;
child = children.indexOf(child);
children.splice(child, 1);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance._nativeTag,
[],
[],
[],
[],
[child]
);
}
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
cancelTimeout = clearTimeout,
BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function getStackByFiberInDevAndProd(workInProgress) {
var info = "";
do {
@ -2080,7 +2066,6 @@ function readContext(context, observedBits) {
currentlyRenderingFiber.dependencies = {
expirationTime: 0,
firstContext: observedBits,
listeners: null,
responders: null
};
} else lastContextDependency = lastContextDependency.next = observedBits;
@ -3297,24 +3282,8 @@ function findFirstSuspended(row) {
}
return null;
}
var currentListenerHookIndex = 0;
function updateListenerHook(responder, props) {
var dependencies = null.dependencies;
null === dependencies &&
(dependencies = null.dependencies = {
expirationTime: 0,
firstContext: null,
listeners: [],
responders: null
});
var listeners = dependencies.listeners;
null === listeners && (dependencies.listeners = listeners = []);
listeners.length === currentListenerHookIndex
? (listeners.push({ responder: responder, props: props }),
currentListenerHookIndex++)
: ((listeners = listeners[currentListenerHookIndex++]),
(listeners.responder = responder),
(listeners.props = props));
function createResponderListener(responder, props) {
return { responder: responder, props: props };
}
var NoEffect$1 = 0,
UnmountSnapshot = 2,
@ -3665,7 +3634,7 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useListener: throwInvalidHookError
useResponder: throwInvalidHookError
},
HooksDispatcherOnMount = {
readContext: readContext,
@ -3739,7 +3708,7 @@ var ContextOnlyDispatcher = {
return [hook.memoizedState, initialState];
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
HooksDispatcherOnUpdate = {
readContext: readContext,
@ -3794,7 +3763,7 @@ var ContextOnlyDispatcher = {
return updateReducer(basicStateReducer, initialState);
},
useDebugValue: mountDebugValue,
useListener: updateListenerHook
useResponder: createResponderListener
},
now$1 = Scheduler.unstable_now,
commitTime = 0,
@ -4024,17 +3993,17 @@ function updateFunctionComponent(
nextProps,
renderExpirationTime
) {
var unmaskedContext = isContextProvider(Component)
var context = isContextProvider(Component)
? previousContext
: contextStackCursor.current;
unmaskedContext = getMaskedContext(workInProgress, unmaskedContext);
context = getMaskedContext(workInProgress, context);
prepareToReadContext(workInProgress, renderExpirationTime);
Component = renderWithHooks(
current$$1,
workInProgress,
Component,
nextProps,
unmaskedContext,
context,
renderExpirationTime
);
if (null !== current$$1 && !didReceiveUpdate)
@ -4684,7 +4653,6 @@ var appendAllChildren = void 0,
appendAllChildren = function(parent, workInProgress) {
for (var node = workInProgress.child; null !== node; ) {
if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
else if (20 === node.tag) parent._children.push(node.stateNode.instance);
else if (4 !== node.tag && null !== node.child) {
node.child.return = node;
node = node.child;
@ -4963,7 +4931,6 @@ function completeWork(current, workInProgress, renderExpirationTime) {
: {
expirationTime: tag.expirationTime,
firstContext: tag.firstContext,
listeners: tag.listeners,
responders: tag.responders
}),
(rootContainerInstance.selfBaseDuration =
@ -5140,6 +5107,15 @@ function logError(boundary, errorInfo) {
});
}
}
function safelyCallComponentWillUnmount(current$$1, instance) {
try {
(instance.props = current$$1.memoizedProps),
(instance.state = current$$1.memoizedState),
instance.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1, unmountError);
}
}
function safelyDetachRef(current$$1) {
var ref = current$$1.ref;
if (null !== ref)
@ -5168,7 +5144,7 @@ function commitHookEffectList(unmountTag, mountTag, finishedWork) {
} while (effect !== finishedWork);
}
}
function commitUnmount(current$$1$jscomp$0) {
function commitUnmount(current$$1$jscomp$0, renderPriorityLevel) {
"function" === typeof onCommitFiberUnmount &&
onCommitFiberUnmount(current$$1$jscomp$0);
switch (current$$1$jscomp$0.tag) {
@ -5181,54 +5157,43 @@ function commitUnmount(current$$1$jscomp$0) {
null !== updateQueue &&
((updateQueue = updateQueue.lastEffect), null !== updateQueue)
) {
var effect = (updateQueue = updateQueue.next);
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
var firstEffect = updateQueue.next;
runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
function() {
var effect = firstEffect;
do {
var destroy = effect.destroy;
if (void 0 !== destroy) {
var current$$1 = current$$1$jscomp$0;
try {
destroy();
} catch (error) {
captureCommitPhaseError(current$$1, error);
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
effect = effect.next;
} while (effect !== updateQueue);
);
}
break;
case 1:
safelyDetachRef(current$$1$jscomp$0);
updateQueue = current$$1$jscomp$0.stateNode;
if ("function" === typeof updateQueue.componentWillUnmount)
try {
(updateQueue.props = current$$1$jscomp$0.memoizedProps),
(updateQueue.state = current$$1$jscomp$0.memoizedState),
updateQueue.componentWillUnmount();
} catch (unmountError) {
captureCommitPhaseError(current$$1$jscomp$0, unmountError);
}
renderPriorityLevel = current$$1$jscomp$0.stateNode;
"function" === typeof renderPriorityLevel.componentWillUnmount &&
safelyCallComponentWillUnmount(
current$$1$jscomp$0,
renderPriorityLevel
);
break;
case 5:
safelyDetachRef(current$$1$jscomp$0);
break;
case 4:
unmountHostComponents(current$$1$jscomp$0);
unmountHostComponents(current$$1$jscomp$0, renderPriorityLevel);
}
}
function commitNestedUnmounts(root) {
for (var node = root; ; )
if ((commitUnmount(node), null !== node.child && 4 !== node.tag))
(node.child.return = node), (node = node.child);
else {
if (node === root) break;
for (; null === node.sibling; ) {
if (null === node.return || node.return === root) return;
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function isHostParent(fiber) {
return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
}
@ -5295,7 +5260,7 @@ function commitPlacement(finishedWork) {
}
for (var node = finishedWork; ; ) {
var isHost = 5 === node.tag || 6 === node.tag;
if (isHost || 20 === node.tag) {
if (isHost) {
var stateNode = isHost ? node.stateNode : node.stateNode.instance;
if (parentFiber)
if (isContainer) {
@ -5379,7 +5344,7 @@ function commitPlacement(finishedWork) {
node = node.sibling;
}
}
function unmountHostComponents(current$$1) {
function unmountHostComponents(current$$1, renderPriorityLevel$jscomp$0) {
for (
var node = current$$1,
currentParentIsValid = !1,
@ -5415,37 +5380,56 @@ function unmountHostComponents(current$$1) {
}
currentParentIsValid = !0;
}
if (5 === node.tag || 6 === node.tag)
if ((commitNestedUnmounts(node), currentParentIsContainer)) {
var parentInstance = currentParent;
recursivelyUncacheFiberNode(node.stateNode);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, node.stateNode);
else if (20 === node.tag)
if (
((parentInstance = node.stateNode.instance),
commitNestedUnmounts(node),
currentParentIsContainer)
) {
var parentInstance$jscomp$0 = currentParent;
recursivelyUncacheFiberNode(parentInstance);
ReactNativePrivateInterface.UIManager.manageChildren(
parentInstance$jscomp$0,
[],
[],
[],
[],
[0]
);
} else removeChild(currentParent, parentInstance);
else if (4 === node.tag) {
if (5 === node.tag || 6 === node.tag) {
a: for (
var root = node,
renderPriorityLevel = renderPriorityLevel$jscomp$0,
node$jscomp$0 = root;
;
)
if (
(commitUnmount(node$jscomp$0, renderPriorityLevel),
null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
)
(node$jscomp$0.child.return = node$jscomp$0),
(node$jscomp$0 = node$jscomp$0.child);
else {
if (node$jscomp$0 === root) break;
for (; null === node$jscomp$0.sibling; ) {
if (null === node$jscomp$0.return || node$jscomp$0.return === root)
break a;
node$jscomp$0 = node$jscomp$0.return;
}
node$jscomp$0.sibling.return = node$jscomp$0.return;
node$jscomp$0 = node$jscomp$0.sibling;
}
currentParentIsContainer
? ((root = currentParent),
recursivelyUncacheFiberNode(node.stateNode),
ReactNativePrivateInterface.UIManager.manageChildren(
root,
[],
[],
[],
[],
[0]
))
: ((root = currentParent),
(node$jscomp$0 = node.stateNode),
recursivelyUncacheFiberNode(node$jscomp$0),
(renderPriorityLevel = root._children),
(node$jscomp$0 = renderPriorityLevel.indexOf(node$jscomp$0)),
renderPriorityLevel.splice(node$jscomp$0, 1),
ReactNativePrivateInterface.UIManager.manageChildren(
root._nativeTag,
[],
[],
[],
[],
[node$jscomp$0]
));
} else if (4 === node.tag) {
if (null !== node.child) {
currentParent = node.stateNode.containerInfo;
currentParentIsContainer = !0;
@ -5453,7 +5437,9 @@ function unmountHostComponents(current$$1) {
node = node.child;
continue;
}
} else if ((commitUnmount(node), null !== node.child)) {
} else if (
(commitUnmount(node, renderPriorityLevel$jscomp$0), null !== node.child)
) {
node.child.return = node;
node = node.child;
continue;
@ -5684,6 +5670,7 @@ var ceil = Math.ceil,
legacyErrorBoundariesThatAlreadyFailed = null,
rootDoesHavePassiveEffects = !1,
rootWithPendingPassiveEffects = null,
pendingPassiveEffectsRenderPriority = 90,
pendingPassiveEffectsExpirationTime = 0,
rootsWithPendingDiscreteUpdates = null,
nestedUpdateCount = 0,
@ -6390,16 +6377,16 @@ function completeUnitOfWork(unitOfWork) {
return null;
}
function commitRoot(root) {
runWithPriority(99, commitRootImpl.bind(null, root));
var renderPriorityLevel = getCurrentPriorityLevel();
runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
null !== rootWithPendingPassiveEffects &&
((root = getCurrentPriorityLevel()),
scheduleCallback(root, function() {
scheduleCallback(97, function() {
flushPassiveEffects();
return null;
}));
});
return null;
}
function commitRootImpl(root) {
function commitRootImpl(root, renderPriorityLevel) {
flushPassiveEffects();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
throw ReactError(Error("Should not already be working."));
@ -6504,7 +6491,7 @@ function commitRootImpl(root) {
nextEffect = updateExpirationTimeBeforeCommit;
do
try {
for (; null !== nextEffect; ) {
for (current$$1 = renderPriorityLevel; null !== nextEffect; ) {
var effectTag = nextEffect.effectTag;
if (effectTag & 128) {
var current$$1$jscomp$0 = nextEffect.alternate;
@ -6530,14 +6517,14 @@ function commitRootImpl(root) {
commitWork(nextEffect.alternate, nextEffect);
break;
case 8:
current$$1 = nextEffect;
unmountHostComponents(current$$1);
current$$1.return = null;
current$$1.child = null;
current$$1.memoizedState = null;
current$$1.updateQueue = null;
current$$1.dependencies = null;
var alternate = current$$1.alternate;
prevProps = nextEffect;
unmountHostComponents(prevProps, current$$1);
prevProps.return = null;
prevProps.child = null;
prevProps.memoizedState = null;
prevProps.updateQueue = null;
prevProps.dependencies = null;
var alternate = prevProps.alternate;
null !== alternate &&
((alternate.return = null),
(alternate.child = null),
@ -6689,38 +6676,39 @@ function commitRootImpl(root) {
if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
(rootDoesHavePassiveEffects = !1),
(rootWithPendingPassiveEffects = root),
(pendingPassiveEffectsExpirationTime = expirationTime);
(pendingPassiveEffectsExpirationTime = expirationTime),
(pendingPassiveEffectsRenderPriority = renderPriorityLevel);
else
for (nextEffect = updateExpirationTimeBeforeCommit; null !== nextEffect; )
(current$$1$jscomp$1 = nextEffect.nextEffect),
(renderPriorityLevel = nextEffect.nextEffect),
(nextEffect.nextEffect = null),
(nextEffect = current$$1$jscomp$1);
current$$1$jscomp$1 = root.firstPendingTime;
if (0 !== current$$1$jscomp$1) {
instance$jscomp$0 = requestCurrentTime();
instance$jscomp$0 = inferPriorityFromExpirationTime(
instance$jscomp$0,
current$$1$jscomp$1
(nextEffect = renderPriorityLevel);
renderPriorityLevel = root.firstPendingTime;
if (0 !== renderPriorityLevel) {
current$$1$jscomp$1 = requestCurrentTime();
current$$1$jscomp$1 = inferPriorityFromExpirationTime(
current$$1$jscomp$1,
renderPriorityLevel
);
if (null !== spawnedWorkDuringRender)
for (
prevProps$jscomp$0 = spawnedWorkDuringRender,
instance$jscomp$0 = spawnedWorkDuringRender,
spawnedWorkDuringRender = null,
updateQueue = 0;
updateQueue < prevProps$jscomp$0.length;
updateQueue++
prevProps$jscomp$0 = 0;
prevProps$jscomp$0 < instance$jscomp$0.length;
prevProps$jscomp$0++
)
scheduleInteractions(
root,
prevProps$jscomp$0[updateQueue],
instance$jscomp$0[prevProps$jscomp$0],
root.memoizedInteractions
);
scheduleCallbackForRoot(root, instance$jscomp$0, current$$1$jscomp$1);
scheduleCallbackForRoot(root, current$$1$jscomp$1, renderPriorityLevel);
} else legacyErrorBoundariesThatAlreadyFailed = null;
effectTag$jscomp$0 || finishPendingInteractions(root, expirationTime);
"function" === typeof onCommitFiberRoot &&
onCommitFiberRoot(finishedWork.stateNode, expirationTime);
1073741823 === current$$1$jscomp$1
1073741823 === renderPriorityLevel
? root === rootWithNestedUpdates
? nestedUpdateCount++
: ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
@ -6737,9 +6725,17 @@ function commitRootImpl(root) {
function flushPassiveEffects() {
if (null === rootWithPendingPassiveEffects) return !1;
var root = rootWithPendingPassiveEffects,
expirationTime = pendingPassiveEffectsExpirationTime;
expirationTime = pendingPassiveEffectsExpirationTime,
renderPriorityLevel = pendingPassiveEffectsRenderPriority;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsExpirationTime = 0;
pendingPassiveEffectsRenderPriority = 90;
return runWithPriority(
97 < renderPriorityLevel ? 97 : renderPriorityLevel,
flushPassiveEffectsImpl.bind(null, root, expirationTime)
);
}
function flushPassiveEffectsImpl(root, expirationTime) {
var prevInteractions = tracing.__interactionsRef.current;
tracing.__interactionsRef.current = root.memoizedInteractions;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
@ -6904,32 +6900,26 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
break;
case 19:
updateExpirationTime = 0 !== (current$$1.effectTag & 64);
if (workInProgress.childExpirationTime < renderExpirationTime)
return (
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
),
updateExpirationTime && (workInProgress.effectTag |= 64),
null
);
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState;
null !== updateExpirationTime &&
((updateExpirationTime.rendering = null),
(updateExpirationTime.tail = null));
updateExpirationTime =
workInProgress.childExpirationTime >= renderExpirationTime;
if (0 !== (current$$1.effectTag & 64)) {
if (updateExpirationTime)
return updateSuspenseListComponent(
current$$1,
workInProgress,
renderExpirationTime
);
workInProgress.effectTag |= 64;
}
var renderState = workInProgress.memoizedState;
null !== renderState &&
((renderState.rendering = null), (renderState.tail = null));
push(
suspenseStackCursor,
suspenseStackCursor.current,
workInProgress
);
if (!updateExpirationTime) return null;
}
return bailoutOnAlreadyFinishedWork(
current$$1,
@ -6948,25 +6938,25 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
var context = getMaskedContext(
renderState = getMaskedContext(
workInProgress,
contextStackCursor.current
);
prepareToReadContext(workInProgress, renderExpirationTime);
context = renderWithHooks(
renderState = renderWithHooks(
null,
workInProgress,
updateExpirationTime,
current$$1,
context,
renderState,
renderExpirationTime
);
workInProgress.effectTag |= 1;
if (
"object" === typeof context &&
null !== context &&
"function" === typeof context.render &&
void 0 === context.$$typeof
"object" === typeof renderState &&
null !== renderState &&
"function" === typeof renderState.render &&
void 0 === renderState.$$typeof
) {
workInProgress.tag = 1;
resetHooks();
@ -6975,8 +6965,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
pushContextProvider(workInProgress);
} else hasContext = !1;
workInProgress.memoizedState =
null !== context.state && void 0 !== context.state
? context.state
null !== renderState.state && void 0 !== renderState.state
? renderState.state
: null;
var getDerivedStateFromProps =
updateExpirationTime.getDerivedStateFromProps;
@ -6987,9 +6977,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
getDerivedStateFromProps,
current$$1
);
context.updater = classComponentUpdater;
workInProgress.stateNode = context;
context._reactInternalFiber = workInProgress;
renderState.updater = classComponentUpdater;
workInProgress.stateNode = renderState;
renderState._reactInternalFiber = workInProgress;
mountClassInstance(
workInProgress,
updateExpirationTime,
@ -7009,28 +6999,28 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
null,
workInProgress,
context,
renderState,
renderExpirationTime
),
(workInProgress = workInProgress.child);
return workInProgress;
case 16:
context = workInProgress.elementType;
renderState = workInProgress.elementType;
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
(workInProgress.effectTag |= 2));
current$$1 = workInProgress.pendingProps;
context = readLazyComponentType(context);
workInProgress.type = context;
hasContext = workInProgress.tag = resolveLazyComponentTag(context);
current$$1 = resolveDefaultProps(context, current$$1);
renderState = readLazyComponentType(renderState);
workInProgress.type = renderState;
hasContext = workInProgress.tag = resolveLazyComponentTag(renderState);
current$$1 = resolveDefaultProps(renderState, current$$1);
switch (hasContext) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -7039,7 +7029,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateClassComponent(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -7048,7 +7038,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateForwardRef(
null,
workInProgress,
context,
renderState,
current$$1,
renderExpirationTime
);
@ -7057,8 +7047,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
workInProgress = updateMemoComponent(
null,
workInProgress,
context,
resolveDefaultProps(context.type, current$$1),
renderState,
resolveDefaultProps(renderState.type, current$$1),
updateExpirationTime,
renderExpirationTime
);
@ -7067,7 +7057,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
throw ReactError(
Error(
"Element type is invalid. Received a promise that resolves to: " +
context +
renderState +
". Lazy element type must resolve to a class or function."
)
);
@ -7076,32 +7066,32 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 0:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateFunctionComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
case 1:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateClassComponent(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7114,8 +7104,8 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
)
);
context = workInProgress.memoizedState;
context = null !== context ? context.element : null;
renderState = workInProgress.memoizedState;
renderState = null !== renderState ? renderState.element : null;
processUpdateQueue(
workInProgress,
updateExpirationTime,
@ -7124,7 +7114,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
renderExpirationTime
);
updateExpirationTime = workInProgress.memoizedState.element;
updateExpirationTime === context
updateExpirationTime === renderState
? (workInProgress = bailoutOnAlreadyFinishedWork(
current$$1,
workInProgress,
@ -7188,16 +7178,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 11:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
updateForwardRef(
current$$1,
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
)
);
@ -7235,9 +7225,9 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 10:
a: {
updateExpirationTime = workInProgress.type._context;
context = workInProgress.pendingProps;
renderState = workInProgress.pendingProps;
getDerivedStateFromProps = workInProgress.memoizedProps;
hasContext = context.value;
hasContext = renderState.value;
pushProvider(workInProgress, hasContext);
if (null !== getDerivedStateFromProps) {
var oldValue = getDerivedStateFromProps.value;
@ -7251,7 +7241,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
: 1073741823) | 0;
if (0 === hasContext) {
if (
getDerivedStateFromProps.children === context.children &&
getDerivedStateFromProps.children === renderState.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@ -7333,7 +7323,7 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
reconcileChildren(
current$$1,
workInProgress,
context.children,
renderState.children,
renderExpirationTime
);
workInProgress = workInProgress.child;
@ -7341,12 +7331,15 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = workInProgress.pendingProps),
(updateExpirationTime = hasContext.children),
prepareToReadContext(workInProgress, renderExpirationTime),
(context = readContext(context, hasContext.unstable_observedBits)),
(updateExpirationTime = updateExpirationTime(context)),
(renderState = readContext(
renderState,
hasContext.unstable_observedBits
)),
(updateExpirationTime = updateExpirationTime(renderState)),
(workInProgress.effectTag |= 1),
reconcileChildren(
current$$1,
@ -7358,16 +7351,16 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
);
case 14:
return (
(context = workInProgress.type),
(renderState = workInProgress.type),
(hasContext = resolveDefaultProps(
context,
renderState,
workInProgress.pendingProps
)),
(hasContext = resolveDefaultProps(context.type, hasContext)),
(hasContext = resolveDefaultProps(renderState.type, hasContext)),
updateMemoComponent(
current$$1,
workInProgress,
context,
renderState,
hasContext,
updateExpirationTime,
renderExpirationTime
@ -7385,11 +7378,11 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
case 17:
return (
(updateExpirationTime = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
(renderState = workInProgress.pendingProps),
(renderState =
workInProgress.elementType === updateExpirationTime
? context
: resolveDefaultProps(updateExpirationTime, context)),
? renderState
: resolveDefaultProps(updateExpirationTime, renderState)),
null !== current$$1 &&
((current$$1.alternate = null),
(workInProgress.alternate = null),
@ -7402,13 +7395,13 @@ beginWork$$1 = function(current$$1, workInProgress, renderExpirationTime) {
constructClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
mountClassInstance(
workInProgress,
updateExpirationTime,
context,
renderState,
renderExpirationTime
),
finishClassComponent(
@ -7614,7 +7607,6 @@ function createWorkInProgress(current, pendingProps) {
: {
expirationTime: pendingProps.expirationTime,
firstContext: pendingProps.firstContext,
listeners: pendingProps.listeners,
responders: pendingProps.responders
};
workInProgress.sibling = current.sibling;

Просмотреть файл

@ -198,8 +198,8 @@ export type ReactNativeResponderEvent = {
export type ReactNativeResponderContext = {
dispatchEvent: (
eventProp: string,
eventValue: any,
listener: (any) => void,
eventPriority: EventPriority,
) => void,
isTargetWithinNode: (

Просмотреть файл

@ -88,6 +88,11 @@ export type ReactEventResponderInstance<E, C> = {|
target: mixed,
|};
export type ReactEventResponderListener<E, C> = {|
props: Object,
responder: ReactEventResponder<E, C>,
|};
export type ReactEventResponder<E, C> = {
$$typeof: Symbol | number,
displayName: string,

Просмотреть файл

@ -81,7 +81,7 @@
"test-ios": "./scripts/objc-test.sh test"
},
"peerDependencies": {
"react": "16.8.6"
"react": "16.9.0"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
@ -110,7 +110,7 @@
"react-devtools-core": "^3.6.3",
"react-refresh": "^0.4.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "0.14.0",
"scheduler": "0.15.0",
"stacktrace-parser": "^0.1.3",
"whatwg-fetch": "^3.0.0"
},
@ -145,8 +145,8 @@
"jscodeshift": "^0.6.2",
"mkdirp": "^0.5.1",
"prettier": "1.17.0",
"react": "16.8.6",
"react-test-renderer": "16.8.6",
"react": "16.9.0",
"react-test-renderer": "16.9.0",
"shelljs": "^0.7.8",
"ws": "^6.1.4",
"yargs": "^9.0.0"

Просмотреть файл

@ -5872,10 +5872,10 @@ react-is@^16.8.1, react-is@^16.8.4:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.4.tgz#90f336a68c3a29a096a3d648ab80e87ec61482a2"
integrity sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA==
react-is@^16.8.6:
version "16.8.6"
resolved "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==
react-is@^16.9.0:
version "16.9.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb"
integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==
react-proxy@^1.1.7:
version "1.1.8"
@ -5890,15 +5890,15 @@ react-refresh@^0.4.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.0.tgz#d421f9bd65e0e4b9822a399f14ac56bda9c92292"
integrity sha512-bacjSio8GOtzNZKZZM6EWqbhlbb6pr28JWJWFTLwEBKvPIBRo6/Ob68D2EWZA2VyTdQxAh+TRnCYOPNKsQiXTA==
react-test-renderer@16.8.6:
version "16.8.6"
resolved "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.8.6.tgz#188d8029b8c39c786f998aa3efd3ffe7642d5ba1"
integrity sha512-H2srzU5IWYT6cZXof6AhUcx/wEyJddQ8l7cLM/F7gDXYyPr4oq+vCIxJYXVGhId1J706sqziAjuOEjyNkfgoEw==
react-test-renderer@16.9.0:
version "16.9.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.9.0.tgz#7ed657a374af47af88f66f33a3ef99c9610c8ae9"
integrity sha512-R62stB73qZyhrJo7wmCW9jgl/07ai+YzvouvCXIJLBkRlRqLx4j9RqcLEAfNfU3OxTGucqR2Whmn3/Aad6L3hQ==
dependencies:
object-assign "^4.1.1"
prop-types "^15.6.2"
react-is "^16.8.6"
scheduler "^0.13.6"
react-is "^16.9.0"
scheduler "^0.15.0"
react-transform-hmr@^1.0.4:
version "1.0.4"
@ -5908,15 +5908,14 @@ react-transform-hmr@^1.0.4:
global "^4.3.0"
react-proxy "^1.1.7"
react@16.8.6:
version "16.8.6"
resolved "https://registry.npmjs.org/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==
react@16.9.0:
version "16.9.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa"
integrity sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"
scheduler "^0.13.6"
read-pkg-up@^2.0.0:
version "2.0.0"
@ -6312,18 +6311,10 @@ sax@~1.1.1:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240"
integrity sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA=
scheduler@0.14.0:
version "0.14.0"
resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.14.0.tgz#b392c23c9c14bfa2933d4740ad5603cc0d59ea5b"
integrity sha512-9CgbS06Kki2f4R9FjLSITjZo5BZxPsryiRNyL3LpvrM9WxcVmhlqAOc9E+KQbeI2nqej4JIIbOsfdL51cNb4Iw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
scheduler@^0.13.6:
version "0.13.6"
resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889"
integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==
scheduler@0.15.0, scheduler@^0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.15.0.tgz#6bfcf80ff850b280fed4aeecc6513bc0b4f17f8e"
integrity sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"