Remove module pattern function component support (#27742)

The module pattern

```
function MyComponent() {
  return {
    render() {
      return this.state.foo
    }
  }
}
```

has been deprecated for approximately 5 years now. This PR removes
support for this pattern. It also simplifies a number of code paths in
particular related to the concept of `IndeterminateComponent` types.

DiffTrain build for commit https://github.com/facebook/react/commit/cc56bed38cbe5a5c76dfdc4e9c642fab4884a3fc.
This commit is contained in:
gnoff
2024-03-28 20:13:11 +00:00
parent cf341bf9a5
commit e5d1bb77dc
10 changed files with 1282 additions and 1842 deletions
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b3f8b9d9ae41ad4e84b986ff88b107f6>>
* @generated SignedSource<<f8e7f8e75e294cdf633624075367dc02>>
*/
"use strict";
@@ -153,8 +153,6 @@ if (__DEV__) {
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
@@ -433,7 +431,6 @@ if (__DEV__) {
case ClassComponent:
case FunctionComponent:
case IncompleteClassComponent:
case IndeterminateComponent:
case MemoComponent:
case SimpleMemoComponent:
if (typeof type === "function") {
@@ -2717,7 +2714,6 @@ if (__DEV__) {
return "SuspenseList";
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
var fn = fiber.type;
return fn.displayName || fn.name || null;
@@ -4825,7 +4821,6 @@ if (__DEV__) {
return describeBuiltInComponentFrame("SuspenseList", owner);
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
return describeFunctionComponentFrame(fiber.type, owner);
@@ -12123,17 +12118,6 @@ if (__DEV__) {
}
}
function adoptClassInstance(workInProgress, instance) {
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
}
function constructClassInstance(workInProgress, ctor, props) {
var isLegacyContextConsumer = false;
var unmaskedContext = emptyContextObject;
@@ -12197,7 +12181,14 @@ if (__DEV__) {
instance.state !== null && instance.state !== undefined
? instance.state
: null);
adoptClassInstance(workInProgress, instance);
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
{
if (
@@ -13461,7 +13452,6 @@ if (__DEV__) {
);
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
@@ -13472,7 +13462,6 @@ if (__DEV__) {
{
didWarnAboutBadClass = {};
didWarnAboutModulePatternComponent = {};
didWarnAboutContextTypeOnFunctionComponent = {};
didWarnAboutGetDerivedStateOnFunctionComponent = {};
didWarnAboutFunctionRefs = {};
@@ -14085,6 +14074,39 @@ if (__DEV__) {
nextProps,
renderLanes
) {
{
if (
Component.prototype &&
typeof Component.prototype.render === "function"
) {
var componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
"This is likely to cause errors. Change %s to extend React.Component instead.",
componentName,
componentName
);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress,
null
);
}
if (current === null) {
// Some validations were previously done in mountIndeterminateComponent however and are now run
// in updateFuntionComponent but only on mount
validateFunctionComponentInDev(workInProgress, workInProgress.type);
}
}
var context;
{
@@ -14515,70 +14537,68 @@ if (__DEV__) {
var Component = init(payload); // Store the unwrapped component in the type.
workInProgress.type = Component;
var resolvedTag = (workInProgress.tag =
resolveLazyComponentTag(Component));
var resolvedProps = resolveDefaultProps(Component, props);
var child;
switch (resolvedTag) {
case FunctionComponent: {
if (typeof Component === "function") {
if (isFunctionClassComponent(Component)) {
workInProgress.tag = ClassComponent;
{
workInProgress.type = Component =
resolveClassForHotReloading(Component);
}
return updateClassComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
} else {
workInProgress.tag = FunctionComponent;
{
validateFunctionComponentInDev(workInProgress, Component);
workInProgress.type = Component =
resolveFunctionForHotReloading(Component);
}
child = updateFunctionComponent(
return updateFunctionComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
case ClassComponent: {
{
workInProgress.type = Component =
resolveClassForHotReloading(Component);
}
if ($$typeof === REACT_FORWARD_REF_TYPE) {
workInProgress.tag = ForwardRef;
child = updateClassComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
case ForwardRef: {
{
workInProgress.type = Component =
resolveForwardRefForHotReloading(Component);
}
child = updateForwardRef(
return updateForwardRef(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
case MemoComponent: {
child = updateMemoComponent(
} else if ($$typeof === REACT_MEMO_TYPE) {
workInProgress.tag = MemoComponent;
return updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
renderLanes
);
return child;
}
}
@@ -14640,111 +14660,6 @@ if (__DEV__) {
);
}
function mountIndeterminateComponent(
_current,
workInProgress,
Component,
renderLanes
) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
var props = workInProgress.pendingProps;
var context;
{
var unmaskedContext = getUnmaskedContext(
workInProgress,
Component,
false
);
context = getMaskedContext(workInProgress, unmaskedContext);
}
prepareToReadContext(workInProgress, renderLanes);
var value;
{
if (
Component.prototype &&
typeof Component.prototype.render === "function"
) {
var componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
"This is likely to cause errors. Change %s to extend React.Component instead.",
componentName,
componentName
);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress,
null
);
}
setIsRendering(true);
ReactCurrentOwner$1.current = workInProgress;
value = renderWithHooks(
null,
workInProgress,
Component,
props,
context,
renderLanes
);
setIsRendering(false);
}
workInProgress.flags |= PerformedWork;
{
// Support for module components is deprecated and is removed behind a flag.
// Whether or not it would crash later, we want to show a good message in DEV first.
if (
typeof value === "object" &&
value !== null &&
typeof value.render === "function" &&
value.$$typeof === undefined
) {
var _componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutModulePatternComponent[_componentName]) {
error(
"The <%s /> component appears to be a function component that returns a class instance. " +
"Change %s to a class that extends React.Component instead. " +
"If you can't use a class try assigning the prototype on the function as a workaround. " +
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
"cannot be called with `new` by React.",
_componentName,
_componentName,
_componentName
);
didWarnAboutModulePatternComponent[_componentName] = true;
}
}
}
{
// Proceed under the assumption that this is a function component
workInProgress.tag = FunctionComponent;
reconcileChildren(null, workInProgress, value, renderLanes);
{
validateFunctionComponentInDev(workInProgress, Component);
}
return workInProgress.child;
}
}
function validateFunctionComponentInDev(workInProgress, Component) {
{
if (Component) {
@@ -14781,33 +14696,32 @@ if (__DEV__) {
}
if (Component.defaultProps !== undefined) {
var _componentName3 =
getComponentNameFromType(Component) || "Unknown";
var _componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName3]) {
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
error(
"%s: Support for defaultProps will be removed from function components " +
"in a future major release. Use JavaScript default parameters instead.",
_componentName3
_componentName
);
didWarnAboutDefaultPropsOnFunctionComponent[_componentName3] = true;
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
}
}
if (typeof Component.getDerivedStateFromProps === "function") {
var _componentName4 =
var _componentName2 =
getComponentNameFromType(Component) || "Unknown";
if (
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4]
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
) {
error(
"%s: Function components do not support getDerivedStateFromProps.",
_componentName4
_componentName2
);
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4] =
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
true;
}
}
@@ -14816,16 +14730,16 @@ if (__DEV__) {
typeof Component.contextType === "object" &&
Component.contextType !== null
) {
var _componentName5 =
var _componentName3 =
getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName5]) {
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
error(
"%s: Function components do not support contextType.",
_componentName5
_componentName3
);
didWarnAboutContextTypeOnFunctionComponent[_componentName5] = true;
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
}
}
}
@@ -16509,15 +16423,6 @@ if (__DEV__) {
workInProgress.lanes = NoLanes;
switch (workInProgress.tag) {
case IndeterminateComponent: {
return mountIndeterminateComponent(
current,
workInProgress,
workInProgress.type,
renderLanes
);
}
case LazyComponent: {
var elementType = workInProgress.elementType;
return mountLazyComponent(
@@ -17666,7 +17571,6 @@ if (__DEV__) {
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
switch (workInProgress.tag) {
case IndeterminateComponent:
case LazyComponent:
case SimpleMemoComponent:
case FunctionComponent:
@@ -23698,12 +23602,6 @@ if (__DEV__) {
}
switch (unitOfWork.tag) {
case IndeterminateComponent: {
// Because it suspended with `use`, we can assume it's a
// function component.
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
}
case SimpleMemoComponent:
case FunctionComponent: {
// Resolve `defaultProps`. This logic is copied from `beginWork`.
@@ -24843,7 +24741,6 @@ if (__DEV__) {
var tag = fiber.tag;
if (
tag !== IndeterminateComponent &&
tag !== HostRoot &&
tag !== ClassComponent &&
tag !== FunctionComponent &&
@@ -25629,22 +25526,8 @@ if (__DEV__) {
type.defaultProps === undefined
);
}
function resolveLazyComponentTag(Component) {
if (typeof Component === "function") {
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
if ($$typeof === REACT_FORWARD_REF_TYPE) {
return ForwardRef;
}
if ($$typeof === REACT_MEMO_TYPE) {
return MemoComponent;
}
}
return IndeterminateComponent;
function isFunctionClassComponent(type) {
return shouldConstruct(type);
} // This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps) {
@@ -25729,7 +25612,6 @@ if (__DEV__) {
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
switch (workInProgress.tag) {
case IndeterminateComponent:
case FunctionComponent:
case SimpleMemoComponent:
workInProgress.type = resolveFunctionForHotReloading(current.type);
@@ -25855,7 +25737,7 @@ if (__DEV__) {
mode,
lanes
) {
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var resolvedType = type;
@@ -26252,7 +26134,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "19.0.0-canary-6c021864";
var ReactVersion = "19.0.0-canary-9424bca2";
// Might add PROFILE later.
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a6a6d1e6f1aaf9b35c7e831132de38c7>>
* @generated SignedSource<<4246320e0183f27d5d91164123c6a1a5>>
*/
"use strict";
@@ -161,7 +161,6 @@ function getComponentNameFromFiber(fiber) {
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof type)
@@ -1268,7 +1267,6 @@ function describeFiber(fiber) {
case 19:
return describeComponentFrame("SuspenseList", null);
case 0:
case 2:
case 15:
return describeFunctionComponentFrame(fiber.type);
case 11:
@@ -4905,112 +4903,95 @@ function beginWork(current, workInProgress, renderLanes) {
else didReceiveUpdate = !1;
workInProgress.lanes = 0;
switch (workInProgress.tag) {
case 2:
var Component = workInProgress.type;
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
var context = getMaskedContext(
workInProgress,
contextStackCursor$1.current
);
prepareToReadContext(workInProgress, renderLanes);
current = renderWithHooks(
null,
workInProgress,
Component,
current,
context,
renderLanes
);
workInProgress.flags |= 1;
workInProgress.tag = 0;
reconcileChildren(null, workInProgress, current, renderLanes);
workInProgress = workInProgress.child;
return workInProgress;
case 16:
Component = workInProgress.elementType;
var elementType = workInProgress.elementType;
a: {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
context = Component._init;
Component = context(Component._payload);
workInProgress.type = Component;
context = workInProgress.tag = resolveLazyComponentTag(Component);
current = resolveDefaultProps(Component, current);
switch (context) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 1:
workInProgress = updateClassComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 11:
workInProgress = updateForwardRef(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 14:
workInProgress = updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, current),
renderLanes
);
break a;
var init = elementType._init;
elementType = init(elementType._payload);
workInProgress.type = elementType;
current = resolveDefaultProps(elementType, current);
if ("function" === typeof elementType)
shouldConstruct(elementType)
? ((workInProgress.tag = 1),
(workInProgress = updateClassComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)))
: ((workInProgress.tag = 0),
(workInProgress = updateFunctionComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)));
else {
if (void 0 !== elementType && null !== elementType)
if (
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
) {
workInProgress.tag = 11;
workInProgress = updateForwardRef(
null,
workInProgress,
elementType,
current,
renderLanes
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress.tag = 14;
workInProgress = updateMemoComponent(
null,
workInProgress,
elementType,
resolveDefaultProps(elementType.type, current),
renderLanes
);
break a;
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
elementType +
". Lazy element type must resolve to a class or function."
);
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
Component +
". Lazy element type must resolve to a class or function."
);
}
return workInProgress;
case 0:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateFunctionComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
case 1:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateClassComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -5019,24 +5000,24 @@ function beginWork(current, workInProgress, renderLanes) {
if (null === current)
throw Error("Should have a current fiber. This is a bug in React.");
var nextProps = workInProgress.pendingProps;
context = workInProgress.memoizedState;
Component = context.element;
init = workInProgress.memoizedState;
elementType = init.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
nextProps = workInProgress.memoizedState;
var nextCache = nextProps.cache;
pushProvider(workInProgress, CacheContext, nextCache);
nextCache !== context.cache &&
nextCache !== init.cache &&
propagateContextChange(workInProgress, CacheContext, renderLanes);
suspendIfUpdateReadFromEntangledAsyncAction();
context = nextProps.element;
context === Component
init = nextProps.element;
init === elementType
? (workInProgress = bailoutOnAlreadyFinishedWork(
current,
workInProgress,
renderLanes
))
: (reconcileChildren(current, workInProgress, context, renderLanes),
: (reconcileChildren(current, workInProgress, init, renderLanes),
(workInProgress = workInProgress.child));
return workInProgress;
case 26:
@@ -5044,9 +5025,9 @@ function beginWork(current, workInProgress, renderLanes) {
case 5:
return (
pushHostContext(workInProgress),
(Component = workInProgress.pendingProps.children),
(elementType = workInProgress.pendingProps.children),
null !== workInProgress.memoizedState &&
((context = renderWithHooks(
((init = renderWithHooks(
current,
workInProgress,
TransitionAwareHostComponent,
@@ -5054,17 +5035,17 @@ function beginWork(current, workInProgress, renderLanes) {
null,
renderLanes
)),
(HostTransitionContext._currentValue2 = context),
(HostTransitionContext._currentValue2 = init),
didReceiveUpdate &&
null !== current &&
current.memoizedState.memoizedState !== context &&
current.memoizedState.memoizedState !== init &&
propagateContextChange(
workInProgress,
HostTransitionContext,
renderLanes
)),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 6:
@@ -5077,30 +5058,35 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress,
workInProgress.stateNode.containerInfo
),
(Component = workInProgress.pendingProps),
(elementType = workInProgress.pendingProps),
null === current
? (workInProgress.child = reconcileChildFibers(
workInProgress,
null,
Component,
elementType,
renderLanes
))
: reconcileChildren(current, workInProgress, Component, renderLanes),
: reconcileChildren(
current,
workInProgress,
elementType,
renderLanes
),
workInProgress.child
);
case 11:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateForwardRef(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -5136,15 +5122,15 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 10:
a: {
Component = workInProgress.type._context;
context = workInProgress.pendingProps;
elementType = workInProgress.type._context;
init = workInProgress.pendingProps;
nextProps = workInProgress.memoizedProps;
nextCache = context.value;
pushProvider(workInProgress, Component, nextCache);
nextCache = init.value;
pushProvider(workInProgress, elementType, nextCache);
if (null !== nextProps)
if (objectIs(nextProps.value, nextCache)) {
if (
nextProps.children === context.children &&
nextProps.children === init.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@@ -5154,37 +5140,33 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
} else propagateContextChange(workInProgress, Component, renderLanes);
reconcileChildren(
current,
workInProgress,
context.children,
renderLanes
);
} else
propagateContextChange(workInProgress, elementType, renderLanes);
reconcileChildren(current, workInProgress, init.children, renderLanes);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(Component = workInProgress.pendingProps.children),
(init = workInProgress.type),
(elementType = workInProgress.pendingProps.children),
prepareToReadContext(workInProgress, renderLanes),
(context = readContext(context)),
(Component = Component(context)),
(init = readContext(init)),
(elementType = elementType(init)),
(workInProgress.flags |= 1),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 14:
return (
(Component = workInProgress.type),
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
(context = resolveDefaultProps(Component.type, context)),
(elementType = workInProgress.type),
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
(init = resolveDefaultProps(elementType.type, init)),
updateMemoComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -5198,24 +5180,24 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 17:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
(workInProgress.tag = 1),
isContextProvider(Component)
isContextProvider(elementType)
? ((current = !0), pushContextProvider(workInProgress))
: (current = !1),
prepareToReadContext(workInProgress, renderLanes),
constructClassInstance(workInProgress, Component, context),
mountClassInstance(workInProgress, Component, context, renderLanes),
constructClassInstance(workInProgress, elementType, init),
mountClassInstance(workInProgress, elementType, init, renderLanes),
finishClassComponent(
null,
workInProgress,
Component,
elementType,
!0,
current,
renderLanes
@@ -5228,39 +5210,39 @@ function beginWork(current, workInProgress, renderLanes) {
case 24:
return (
prepareToReadContext(workInProgress, renderLanes),
(Component = readContext(CacheContext)),
(elementType = readContext(CacheContext)),
null === current
? ((context = peekCacheFromPool()),
null === context &&
((context = workInProgressRoot),
? ((init = peekCacheFromPool()),
null === init &&
((init = workInProgressRoot),
(nextProps = createCache()),
(context.pooledCache = nextProps),
(init.pooledCache = nextProps),
nextProps.refCount++,
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
(context = nextProps)),
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
(init = nextProps)),
(workInProgress.memoizedState = {
parent: Component,
cache: context
parent: elementType,
cache: init
}),
initializeUpdateQueue(workInProgress),
pushProvider(workInProgress, CacheContext, context))
pushProvider(workInProgress, CacheContext, init))
: (0 !== (current.lanes & renderLanes) &&
(cloneUpdateQueue(current, workInProgress),
processUpdateQueue(workInProgress, null, null, renderLanes),
suspendIfUpdateReadFromEntangledAsyncAction()),
(context = current.memoizedState),
(init = current.memoizedState),
(nextProps = workInProgress.memoizedState),
context.parent !== Component
? ((context = { parent: Component, cache: Component }),
(workInProgress.memoizedState = context),
init.parent !== elementType
? ((init = { parent: elementType, cache: elementType }),
(workInProgress.memoizedState = init),
0 === workInProgress.lanes &&
(workInProgress.memoizedState =
workInProgress.updateQueue.baseState =
context),
pushProvider(workInProgress, CacheContext, Component))
: ((Component = nextProps.cache),
pushProvider(workInProgress, CacheContext, Component),
Component !== context.cache &&
init),
pushProvider(workInProgress, CacheContext, elementType))
: ((elementType = nextProps.cache),
pushProvider(workInProgress, CacheContext, elementType),
elementType !== init.cache &&
propagateContextChange(
workInProgress,
CacheContext,
@@ -5546,7 +5528,6 @@ function bubbleProperties(completedWork) {
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
case 2:
case 16:
case 15:
case 0:
@@ -8055,8 +8036,6 @@ function performUnitOfWork(unitOfWork) {
function replaySuspendedUnitOfWork(unitOfWork) {
var current = unitOfWork.alternate;
switch (unitOfWork.tag) {
case 2:
unitOfWork.tag = 0;
case 15:
case 0:
var Component = unitOfWork.type,
@@ -8505,16 +8484,6 @@ function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component)
return shouldConstruct(Component) ? 1 : 0;
if (void 0 !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress
@@ -8592,7 +8561,7 @@ function createFiberFromTypeAndProps(
mode,
lanes
) {
var fiberTag = 2;
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type) fiberTag = 5;
@@ -9181,19 +9150,19 @@ function wrapFiber(fiber) {
fiberToWrapper.set(fiber, wrapper));
return wrapper;
}
var devToolsConfig$jscomp$inline_1009 = {
var devToolsConfig$jscomp$inline_995 = {
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-canary-34d57ea6",
version: "19.0.0-canary-519dded5",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1197 = {
bundleType: devToolsConfig$jscomp$inline_1009.bundleType,
version: devToolsConfig$jscomp$inline_1009.version,
rendererPackageName: devToolsConfig$jscomp$inline_1009.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1009.rendererConfig,
var internals$jscomp$inline_1180 = {
bundleType: devToolsConfig$jscomp$inline_995.bundleType,
version: devToolsConfig$jscomp$inline_995.version,
rendererPackageName: devToolsConfig$jscomp$inline_995.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_995.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -9210,26 +9179,26 @@ var internals$jscomp$inline_1197 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1009.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_995.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-34d57ea6"
reconcilerVersion: "19.0.0-canary-519dded5"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1198 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1181 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1198.isDisabled &&
hook$jscomp$inline_1198.supportsFiber
!hook$jscomp$inline_1181.isDisabled &&
hook$jscomp$inline_1181.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1198.inject(
internals$jscomp$inline_1197
(rendererID = hook$jscomp$inline_1181.inject(
internals$jscomp$inline_1180
)),
(injectedHook = hook$jscomp$inline_1198);
(injectedHook = hook$jscomp$inline_1181);
} catch (err) {}
}
exports._Scheduler = Scheduler;
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a770edfebf8c3b9defa939442fec4e9f>>
* @generated SignedSource<<5ba107fe7188cdee7f75daa50f35f021>>
*/
"use strict";
@@ -161,7 +161,6 @@ function getComponentNameFromFiber(fiber) {
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof type)
@@ -1286,7 +1285,6 @@ function describeFiber(fiber) {
case 19:
return describeComponentFrame("SuspenseList", null);
case 0:
case 2:
case 15:
return describeFunctionComponentFrame(fiber.type);
case 11:
@@ -5007,112 +5005,95 @@ function beginWork(current, workInProgress, renderLanes) {
else didReceiveUpdate = !1;
workInProgress.lanes = 0;
switch (workInProgress.tag) {
case 2:
var Component = workInProgress.type;
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
var context = getMaskedContext(
workInProgress,
contextStackCursor$1.current
);
prepareToReadContext(workInProgress, renderLanes);
current = renderWithHooks(
null,
workInProgress,
Component,
current,
context,
renderLanes
);
workInProgress.flags |= 1;
workInProgress.tag = 0;
reconcileChildren(null, workInProgress, current, renderLanes);
workInProgress = workInProgress.child;
return workInProgress;
case 16:
Component = workInProgress.elementType;
var elementType = workInProgress.elementType;
a: {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
context = Component._init;
Component = context(Component._payload);
workInProgress.type = Component;
context = workInProgress.tag = resolveLazyComponentTag(Component);
current = resolveDefaultProps(Component, current);
switch (context) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 1:
workInProgress = updateClassComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 11:
workInProgress = updateForwardRef(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 14:
workInProgress = updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, current),
renderLanes
);
break a;
var init = elementType._init;
elementType = init(elementType._payload);
workInProgress.type = elementType;
current = resolveDefaultProps(elementType, current);
if ("function" === typeof elementType)
shouldConstruct(elementType)
? ((workInProgress.tag = 1),
(workInProgress = updateClassComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)))
: ((workInProgress.tag = 0),
(workInProgress = updateFunctionComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)));
else {
if (void 0 !== elementType && null !== elementType)
if (
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
) {
workInProgress.tag = 11;
workInProgress = updateForwardRef(
null,
workInProgress,
elementType,
current,
renderLanes
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress.tag = 14;
workInProgress = updateMemoComponent(
null,
workInProgress,
elementType,
resolveDefaultProps(elementType.type, current),
renderLanes
);
break a;
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
elementType +
". Lazy element type must resolve to a class or function."
);
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
Component +
". Lazy element type must resolve to a class or function."
);
}
return workInProgress;
case 0:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateFunctionComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
case 1:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateClassComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -5121,24 +5102,24 @@ function beginWork(current, workInProgress, renderLanes) {
if (null === current)
throw Error("Should have a current fiber. This is a bug in React.");
var nextProps = workInProgress.pendingProps;
context = workInProgress.memoizedState;
Component = context.element;
init = workInProgress.memoizedState;
elementType = init.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
nextProps = workInProgress.memoizedState;
var nextCache = nextProps.cache;
pushProvider(workInProgress, CacheContext, nextCache);
nextCache !== context.cache &&
nextCache !== init.cache &&
propagateContextChange(workInProgress, CacheContext, renderLanes);
suspendIfUpdateReadFromEntangledAsyncAction();
context = nextProps.element;
context === Component
init = nextProps.element;
init === elementType
? (workInProgress = bailoutOnAlreadyFinishedWork(
current,
workInProgress,
renderLanes
))
: (reconcileChildren(current, workInProgress, context, renderLanes),
: (reconcileChildren(current, workInProgress, init, renderLanes),
(workInProgress = workInProgress.child));
return workInProgress;
case 26:
@@ -5146,9 +5127,9 @@ function beginWork(current, workInProgress, renderLanes) {
case 5:
return (
pushHostContext(workInProgress),
(Component = workInProgress.pendingProps.children),
(elementType = workInProgress.pendingProps.children),
null !== workInProgress.memoizedState &&
((context = renderWithHooks(
((init = renderWithHooks(
current,
workInProgress,
TransitionAwareHostComponent,
@@ -5156,17 +5137,17 @@ function beginWork(current, workInProgress, renderLanes) {
null,
renderLanes
)),
(HostTransitionContext._currentValue2 = context),
(HostTransitionContext._currentValue2 = init),
didReceiveUpdate &&
null !== current &&
current.memoizedState.memoizedState !== context &&
current.memoizedState.memoizedState !== init &&
propagateContextChange(
workInProgress,
HostTransitionContext,
renderLanes
)),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 6:
@@ -5179,30 +5160,35 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress,
workInProgress.stateNode.containerInfo
),
(Component = workInProgress.pendingProps),
(elementType = workInProgress.pendingProps),
null === current
? (workInProgress.child = reconcileChildFibers(
workInProgress,
null,
Component,
elementType,
renderLanes
))
: reconcileChildren(current, workInProgress, Component, renderLanes),
: reconcileChildren(
current,
workInProgress,
elementType,
renderLanes
),
workInProgress.child
);
case 11:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateForwardRef(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -5229,9 +5215,9 @@ function beginWork(current, workInProgress, renderLanes) {
case 12:
return (
(workInProgress.flags |= 4),
(Component = workInProgress.stateNode),
(Component.effectDuration = 0),
(Component.passiveEffectDuration = 0),
(elementType = workInProgress.stateNode),
(elementType.effectDuration = 0),
(elementType.passiveEffectDuration = 0),
reconcileChildren(
current,
workInProgress,
@@ -5242,15 +5228,15 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 10:
a: {
Component = workInProgress.type._context;
context = workInProgress.pendingProps;
elementType = workInProgress.type._context;
init = workInProgress.pendingProps;
nextProps = workInProgress.memoizedProps;
nextCache = context.value;
pushProvider(workInProgress, Component, nextCache);
nextCache = init.value;
pushProvider(workInProgress, elementType, nextCache);
if (null !== nextProps)
if (objectIs(nextProps.value, nextCache)) {
if (
nextProps.children === context.children &&
nextProps.children === init.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@@ -5260,37 +5246,33 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
} else propagateContextChange(workInProgress, Component, renderLanes);
reconcileChildren(
current,
workInProgress,
context.children,
renderLanes
);
} else
propagateContextChange(workInProgress, elementType, renderLanes);
reconcileChildren(current, workInProgress, init.children, renderLanes);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return (
(context = workInProgress.type),
(Component = workInProgress.pendingProps.children),
(init = workInProgress.type),
(elementType = workInProgress.pendingProps.children),
prepareToReadContext(workInProgress, renderLanes),
(context = readContext(context)),
(Component = Component(context)),
(init = readContext(init)),
(elementType = elementType(init)),
(workInProgress.flags |= 1),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 14:
return (
(Component = workInProgress.type),
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
(context = resolveDefaultProps(Component.type, context)),
(elementType = workInProgress.type),
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
(init = resolveDefaultProps(elementType.type, init)),
updateMemoComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -5304,24 +5286,24 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 17:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
(workInProgress.tag = 1),
isContextProvider(Component)
isContextProvider(elementType)
? ((current = !0), pushContextProvider(workInProgress))
: (current = !1),
prepareToReadContext(workInProgress, renderLanes),
constructClassInstance(workInProgress, Component, context),
mountClassInstance(workInProgress, Component, context, renderLanes),
constructClassInstance(workInProgress, elementType, init),
mountClassInstance(workInProgress, elementType, init, renderLanes),
finishClassComponent(
null,
workInProgress,
Component,
elementType,
!0,
current,
renderLanes
@@ -5334,39 +5316,39 @@ function beginWork(current, workInProgress, renderLanes) {
case 24:
return (
prepareToReadContext(workInProgress, renderLanes),
(Component = readContext(CacheContext)),
(elementType = readContext(CacheContext)),
null === current
? ((context = peekCacheFromPool()),
null === context &&
((context = workInProgressRoot),
? ((init = peekCacheFromPool()),
null === init &&
((init = workInProgressRoot),
(nextProps = createCache()),
(context.pooledCache = nextProps),
(init.pooledCache = nextProps),
nextProps.refCount++,
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
(context = nextProps)),
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
(init = nextProps)),
(workInProgress.memoizedState = {
parent: Component,
cache: context
parent: elementType,
cache: init
}),
initializeUpdateQueue(workInProgress),
pushProvider(workInProgress, CacheContext, context))
pushProvider(workInProgress, CacheContext, init))
: (0 !== (current.lanes & renderLanes) &&
(cloneUpdateQueue(current, workInProgress),
processUpdateQueue(workInProgress, null, null, renderLanes),
suspendIfUpdateReadFromEntangledAsyncAction()),
(context = current.memoizedState),
(init = current.memoizedState),
(nextProps = workInProgress.memoizedState),
context.parent !== Component
? ((context = { parent: Component, cache: Component }),
(workInProgress.memoizedState = context),
init.parent !== elementType
? ((init = { parent: elementType, cache: elementType }),
(workInProgress.memoizedState = init),
0 === workInProgress.lanes &&
(workInProgress.memoizedState =
workInProgress.updateQueue.baseState =
context),
pushProvider(workInProgress, CacheContext, Component))
: ((Component = nextProps.cache),
pushProvider(workInProgress, CacheContext, Component),
Component !== context.cache &&
init),
pushProvider(workInProgress, CacheContext, elementType))
: ((elementType = nextProps.cache),
pushProvider(workInProgress, CacheContext, elementType),
elementType !== init.cache &&
propagateContextChange(
workInProgress,
CacheContext,
@@ -5688,7 +5670,6 @@ function bubbleProperties(completedWork) {
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
case 2:
case 16:
case 15:
case 0:
@@ -8410,8 +8391,6 @@ function replaySuspendedUnitOfWork(unitOfWork) {
isProfilingMode = 0 !== (unitOfWork.mode & 2);
isProfilingMode && startProfilerTimer(unitOfWork);
switch (unitOfWork.tag) {
case 2:
unitOfWork.tag = 0;
case 15:
case 0:
var Component = unitOfWork.type,
@@ -8920,16 +8899,6 @@ function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component)
return shouldConstruct(Component) ? 1 : 0;
if (void 0 !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress
@@ -9015,7 +8984,7 @@ function createFiberFromTypeAndProps(
mode,
lanes
) {
var fiberTag = 2;
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type) fiberTag = 5;
@@ -9607,19 +9576,19 @@ function wrapFiber(fiber) {
fiberToWrapper.set(fiber, wrapper));
return wrapper;
}
var devToolsConfig$jscomp$inline_1052 = {
var devToolsConfig$jscomp$inline_1038 = {
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-canary-a4b56d0a",
version: "19.0.0-canary-d49e00ea",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1238 = {
bundleType: devToolsConfig$jscomp$inline_1052.bundleType,
version: devToolsConfig$jscomp$inline_1052.version,
rendererPackageName: devToolsConfig$jscomp$inline_1052.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1052.rendererConfig,
var internals$jscomp$inline_1221 = {
bundleType: devToolsConfig$jscomp$inline_1038.bundleType,
version: devToolsConfig$jscomp$inline_1038.version,
rendererPackageName: devToolsConfig$jscomp$inline_1038.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1038.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -9636,26 +9605,26 @@ var internals$jscomp$inline_1238 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1052.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1038.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-a4b56d0a"
reconcilerVersion: "19.0.0-canary-d49e00ea"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1222 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1239.isDisabled &&
hook$jscomp$inline_1239.supportsFiber
!hook$jscomp$inline_1222.isDisabled &&
hook$jscomp$inline_1222.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1239.inject(
internals$jscomp$inline_1238
(rendererID = hook$jscomp$inline_1222.inject(
internals$jscomp$inline_1221
)),
(injectedHook = hook$jscomp$inline_1239);
(injectedHook = hook$jscomp$inline_1222);
} catch (err) {}
}
exports._Scheduler = Scheduler;
@@ -1 +1 @@
63651c49e068a04cdc6ee1e2fa9c6125167987d2
cc56bed38cbe5a5c76dfdc4e9c642fab4884a3fc
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b96b1db3ec870619c9c09b3905a87f32>>
* @generated SignedSource<<2940dab0e5bb073c10640613b89c3d00>>
*/
"use strict";
@@ -993,8 +993,6 @@ if (__DEV__) {
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
@@ -5380,7 +5378,6 @@ to return true:wantsResponderID| |
case ClassComponent:
case FunctionComponent:
case IncompleteClassComponent:
case IndeterminateComponent:
case MemoComponent:
case SimpleMemoComponent:
if (typeof type === "function") {
@@ -6197,7 +6194,6 @@ to return true:wantsResponderID| |
return "SuspenseList";
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
var fn = fiber.type;
return fn.displayName || fn.name || null;
@@ -8616,7 +8612,6 @@ to return true:wantsResponderID| |
return describeBuiltInComponentFrame("SuspenseList", owner);
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
return describeFunctionComponentFrame(fiber.type, owner);
@@ -16115,17 +16110,6 @@ to return true:wantsResponderID| |
}
}
function adoptClassInstance(workInProgress, instance) {
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
}
function constructClassInstance(workInProgress, ctor, props) {
var isLegacyContextConsumer = false;
var unmaskedContext = emptyContextObject;
@@ -16201,7 +16185,14 @@ to return true:wantsResponderID| |
instance.state !== null && instance.state !== undefined
? instance.state
: null);
adoptClassInstance(workInProgress, instance);
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
{
if (
@@ -17472,7 +17463,6 @@ to return true:wantsResponderID| |
);
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
@@ -17483,7 +17473,6 @@ to return true:wantsResponderID| |
{
didWarnAboutBadClass = {};
didWarnAboutModulePatternComponent = {};
didWarnAboutContextTypeOnFunctionComponent = {};
didWarnAboutGetDerivedStateOnFunctionComponent = {};
didWarnAboutFunctionRefs = {};
@@ -18104,6 +18093,39 @@ to return true:wantsResponderID| |
nextProps,
renderLanes
) {
{
if (
Component.prototype &&
typeof Component.prototype.render === "function"
) {
var componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
"This is likely to cause errors. Change %s to extend React.Component instead.",
componentName,
componentName
);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress,
null
);
}
if (current === null) {
// Some validations were previously done in mountIndeterminateComponent however and are now run
// in updateFuntionComponent but only on mount
validateFunctionComponentInDev(workInProgress, workInProgress.type);
}
}
var context;
{
@@ -18568,70 +18590,68 @@ to return true:wantsResponderID| |
var Component = init(payload); // Store the unwrapped component in the type.
workInProgress.type = Component;
var resolvedTag = (workInProgress.tag =
resolveLazyComponentTag(Component));
var resolvedProps = resolveDefaultProps(Component, props);
var child;
switch (resolvedTag) {
case FunctionComponent: {
if (typeof Component === "function") {
if (isFunctionClassComponent(Component)) {
workInProgress.tag = ClassComponent;
{
workInProgress.type = Component =
resolveClassForHotReloading(Component);
}
return updateClassComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
} else {
workInProgress.tag = FunctionComponent;
{
validateFunctionComponentInDev(workInProgress, Component);
workInProgress.type = Component =
resolveFunctionForHotReloading(Component);
}
child = updateFunctionComponent(
return updateFunctionComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
case ClassComponent: {
{
workInProgress.type = Component =
resolveClassForHotReloading(Component);
}
if ($$typeof === REACT_FORWARD_REF_TYPE) {
workInProgress.tag = ForwardRef;
child = updateClassComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
case ForwardRef: {
{
workInProgress.type = Component =
resolveForwardRefForHotReloading(Component);
}
child = updateForwardRef(
return updateForwardRef(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
case MemoComponent: {
child = updateMemoComponent(
} else if ($$typeof === REACT_MEMO_TYPE) {
workInProgress.tag = MemoComponent;
return updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
renderLanes
);
return child;
}
}
@@ -18693,119 +18713,6 @@ to return true:wantsResponderID| |
);
}
function mountIndeterminateComponent(
_current,
workInProgress,
Component,
renderLanes
) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
var props = workInProgress.pendingProps;
var context;
{
var unmaskedContext = getUnmaskedContext(
workInProgress,
Component,
false
);
context = getMaskedContext(workInProgress, unmaskedContext);
}
prepareToReadContext(workInProgress, renderLanes);
var value;
{
markComponentRenderStarted(workInProgress);
}
{
if (
Component.prototype &&
typeof Component.prototype.render === "function"
) {
var componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
"This is likely to cause errors. Change %s to extend React.Component instead.",
componentName,
componentName
);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress,
null
);
}
setIsRendering(true);
ReactCurrentOwner$2.current = workInProgress;
value = renderWithHooks(
null,
workInProgress,
Component,
props,
context,
renderLanes
);
setIsRendering(false);
}
{
markComponentRenderStopped();
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
{
// Support for module components is deprecated and is removed behind a flag.
// Whether or not it would crash later, we want to show a good message in DEV first.
if (
typeof value === "object" &&
value !== null &&
typeof value.render === "function" &&
value.$$typeof === undefined
) {
var _componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutModulePatternComponent[_componentName]) {
error(
"The <%s /> component appears to be a function component that returns a class instance. " +
"Change %s to a class that extends React.Component instead. " +
"If you can't use a class try assigning the prototype on the function as a workaround. " +
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
"cannot be called with `new` by React.",
_componentName,
_componentName,
_componentName
);
didWarnAboutModulePatternComponent[_componentName] = true;
}
}
}
{
// Proceed under the assumption that this is a function component
workInProgress.tag = FunctionComponent;
reconcileChildren(null, workInProgress, value, renderLanes);
{
validateFunctionComponentInDev(workInProgress, Component);
}
return workInProgress.child;
}
}
function validateFunctionComponentInDev(workInProgress, Component) {
{
if (Component) {
@@ -18842,33 +18749,32 @@ to return true:wantsResponderID| |
}
if (Component.defaultProps !== undefined) {
var _componentName3 =
getComponentNameFromType(Component) || "Unknown";
var _componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName3]) {
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
error(
"%s: Support for defaultProps will be removed from function components " +
"in a future major release. Use JavaScript default parameters instead.",
_componentName3
_componentName
);
didWarnAboutDefaultPropsOnFunctionComponent[_componentName3] = true;
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
}
}
if (typeof Component.getDerivedStateFromProps === "function") {
var _componentName4 =
var _componentName2 =
getComponentNameFromType(Component) || "Unknown";
if (
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4]
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
) {
error(
"%s: Function components do not support getDerivedStateFromProps.",
_componentName4
_componentName2
);
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4] =
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
true;
}
}
@@ -18877,16 +18783,16 @@ to return true:wantsResponderID| |
typeof Component.contextType === "object" &&
Component.contextType !== null
) {
var _componentName5 =
var _componentName3 =
getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName5]) {
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
error(
"%s: Function components do not support contextType.",
_componentName5
_componentName3
);
didWarnAboutContextTypeOnFunctionComponent[_componentName5] = true;
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
}
}
}
@@ -20618,15 +20524,6 @@ to return true:wantsResponderID| |
workInProgress.lanes = NoLanes;
switch (workInProgress.tag) {
case IndeterminateComponent: {
return mountIndeterminateComponent(
current,
workInProgress,
workInProgress.type,
renderLanes
);
}
case LazyComponent: {
var elementType = workInProgress.elementType;
return mountLazyComponent(
@@ -22007,7 +21904,6 @@ to return true:wantsResponderID| |
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
switch (workInProgress.tag) {
case IndeterminateComponent:
case LazyComponent:
case SimpleMemoComponent:
case FunctionComponent:
@@ -27840,12 +27736,6 @@ to return true:wantsResponderID| |
}
switch (unitOfWork.tag) {
case IndeterminateComponent: {
// Because it suspended with `use`, we can assume it's a
// function component.
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
}
case SimpleMemoComponent:
case FunctionComponent: {
// Resolve `defaultProps`. This logic is copied from `beginWork`.
@@ -29154,7 +29044,6 @@ to return true:wantsResponderID| |
var tag = fiber.tag;
if (
tag !== IndeterminateComponent &&
tag !== HostRoot &&
tag !== ClassComponent &&
tag !== FunctionComponent &&
@@ -29953,22 +29842,8 @@ to return true:wantsResponderID| |
type.defaultProps === undefined
);
}
function resolveLazyComponentTag(Component) {
if (typeof Component === "function") {
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
if ($$typeof === REACT_FORWARD_REF_TYPE) {
return ForwardRef;
}
if ($$typeof === REACT_MEMO_TYPE) {
return MemoComponent;
}
}
return IndeterminateComponent;
function isFunctionClassComponent(type) {
return shouldConstruct(type);
} // This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps) {
@@ -30053,7 +29928,6 @@ to return true:wantsResponderID| |
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
switch (workInProgress.tag) {
case IndeterminateComponent:
case FunctionComponent:
case SimpleMemoComponent:
workInProgress.type = resolveFunctionForHotReloading(current.type);
@@ -30172,7 +30046,7 @@ to return true:wantsResponderID| |
mode,
lanes
) {
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var resolvedType = type;
@@ -30583,7 +30457,7 @@ to return true:wantsResponderID| |
return root;
}
var ReactVersion = "19.0.0-canary-fb494e93";
var ReactVersion = "19.0.0-canary-d286a6be";
function createPortal$1(
children,
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<290dfece63aea68ecb6f52375631b2ff>>
* @generated SignedSource<<2949dbdb6975d15ebcc9eddf576ec1e9>>
*/
"use strict";
@@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_246 = {
var injectedNamesToPlugins$jscomp$inline_245 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_246 = {
}
}
},
isOrderingDirty$jscomp$inline_247 = !1,
pluginName$jscomp$inline_248;
for (pluginName$jscomp$inline_248 in injectedNamesToPlugins$jscomp$inline_246)
isOrderingDirty$jscomp$inline_246 = !1,
pluginName$jscomp$inline_247;
for (pluginName$jscomp$inline_247 in injectedNamesToPlugins$jscomp$inline_245)
if (
injectedNamesToPlugins$jscomp$inline_246.hasOwnProperty(
pluginName$jscomp$inline_248
injectedNamesToPlugins$jscomp$inline_245.hasOwnProperty(
pluginName$jscomp$inline_247
)
) {
var pluginModule$jscomp$inline_249 =
injectedNamesToPlugins$jscomp$inline_246[pluginName$jscomp$inline_248];
var pluginModule$jscomp$inline_248 =
injectedNamesToPlugins$jscomp$inline_245[pluginName$jscomp$inline_247];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_248) ||
namesToPlugins[pluginName$jscomp$inline_248] !==
pluginModule$jscomp$inline_249
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_247) ||
namesToPlugins[pluginName$jscomp$inline_247] !==
pluginModule$jscomp$inline_248
) {
if (namesToPlugins[pluginName$jscomp$inline_248])
if (namesToPlugins[pluginName$jscomp$inline_247])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
(pluginName$jscomp$inline_248 + "`.")
(pluginName$jscomp$inline_247 + "`.")
);
namesToPlugins[pluginName$jscomp$inline_248] =
pluginModule$jscomp$inline_249;
isOrderingDirty$jscomp$inline_247 = !0;
namesToPlugins[pluginName$jscomp$inline_247] =
pluginModule$jscomp$inline_248;
isOrderingDirty$jscomp$inline_246 = !0;
}
}
isOrderingDirty$jscomp$inline_247 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_246 && recomputePluginOrdering();
var emptyObject$1 = {},
removedKeys = null,
removedKeyCount = 0,
@@ -1779,7 +1779,6 @@ function getComponentNameFromFiber(fiber) {
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof type)
@@ -2774,7 +2773,6 @@ function describeFiber(fiber) {
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 2:
case 15:
return describeFunctionComponentFrame(fiber.type);
case 11:
@@ -6487,112 +6485,95 @@ function beginWork(current, workInProgress, renderLanes) {
else didReceiveUpdate = !1;
workInProgress.lanes = 0;
switch (workInProgress.tag) {
case 2:
var Component = workInProgress.type;
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
var context = getMaskedContext(
workInProgress,
contextStackCursor$1.current
);
prepareToReadContext(workInProgress, renderLanes);
current = renderWithHooks(
null,
workInProgress,
Component,
current,
context,
renderLanes
);
workInProgress.flags |= 1;
workInProgress.tag = 0;
reconcileChildren(null, workInProgress, current, renderLanes);
workInProgress = workInProgress.child;
return workInProgress;
case 16:
Component = workInProgress.elementType;
var elementType = workInProgress.elementType;
a: {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
context = Component._init;
Component = context(Component._payload);
workInProgress.type = Component;
context = workInProgress.tag = resolveLazyComponentTag(Component);
current = resolveDefaultProps(Component, current);
switch (context) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 1:
workInProgress = updateClassComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 11:
workInProgress = updateForwardRef(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 14:
workInProgress = updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, current),
renderLanes
);
break a;
var init = elementType._init;
elementType = init(elementType._payload);
workInProgress.type = elementType;
current = resolveDefaultProps(elementType, current);
if ("function" === typeof elementType)
shouldConstruct(elementType)
? ((workInProgress.tag = 1),
(workInProgress = updateClassComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)))
: ((workInProgress.tag = 0),
(workInProgress = updateFunctionComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)));
else {
if (void 0 !== elementType && null !== elementType)
if (
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
) {
workInProgress.tag = 11;
workInProgress = updateForwardRef(
null,
workInProgress,
elementType,
current,
renderLanes
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress.tag = 14;
workInProgress = updateMemoComponent(
null,
workInProgress,
elementType,
resolveDefaultProps(elementType.type, current),
renderLanes
);
break a;
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
elementType +
". Lazy element type must resolve to a class or function."
);
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
Component +
". Lazy element type must resolve to a class or function."
);
}
return workInProgress;
case 0:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateFunctionComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
case 1:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateClassComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6601,34 +6582,34 @@ function beginWork(current, workInProgress, renderLanes) {
if (null === current)
throw Error("Should have a current fiber. This is a bug in React.");
var nextProps = workInProgress.pendingProps;
context = workInProgress.memoizedState;
Component = context.element;
init = workInProgress.memoizedState;
elementType = init.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
nextProps = workInProgress.memoizedState;
var nextCache = nextProps.cache;
pushProvider(workInProgress, CacheContext, nextCache);
nextCache !== context.cache &&
nextCache !== init.cache &&
propagateContextChange(workInProgress, CacheContext, renderLanes);
suspendIfUpdateReadFromEntangledAsyncAction();
context = nextProps.element;
context === Component
init = nextProps.element;
init === elementType
? (workInProgress = bailoutOnAlreadyFinishedWork(
current,
workInProgress,
renderLanes
))
: (reconcileChildren(current, workInProgress, context, renderLanes),
: (reconcileChildren(current, workInProgress, init, renderLanes),
(workInProgress = workInProgress.child));
return workInProgress;
case 26:
case 27:
case 5:
pushHostContext(workInProgress);
Component = workInProgress.pendingProps.children;
elementType = workInProgress.pendingProps.children;
if (enableAsyncActions && null !== workInProgress.memoizedState) {
if (!enableAsyncActions) throw Error("Not implemented.");
context = renderWithHooks(
init = renderWithHooks(
current,
workInProgress,
TransitionAwareHostComponent,
@@ -6636,10 +6617,10 @@ function beginWork(current, workInProgress, renderLanes) {
null,
renderLanes
);
HostTransitionContext._currentValue2 = context;
HostTransitionContext._currentValue2 = init;
didReceiveUpdate &&
null !== current &&
current.memoizedState.memoizedState !== context &&
current.memoizedState.memoizedState !== init &&
propagateContextChange(
workInProgress,
HostTransitionContext,
@@ -6647,7 +6628,7 @@ function beginWork(current, workInProgress, renderLanes) {
);
}
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, Component, renderLanes);
reconcileChildren(current, workInProgress, elementType, renderLanes);
return workInProgress.child;
case 6:
return null;
@@ -6659,30 +6640,35 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress,
workInProgress.stateNode.containerInfo
),
(Component = workInProgress.pendingProps),
(elementType = workInProgress.pendingProps),
null === current
? (workInProgress.child = reconcileChildFibers(
workInProgress,
null,
Component,
elementType,
renderLanes
))
: reconcileChildren(current, workInProgress, Component, renderLanes),
: reconcileChildren(
current,
workInProgress,
elementType,
renderLanes
),
workInProgress.child
);
case 11:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateForwardRef(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6718,17 +6704,17 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 10:
a: {
Component = enableRenderableContext
elementType = enableRenderableContext
? workInProgress.type
: workInProgress.type._context;
context = workInProgress.pendingProps;
init = workInProgress.pendingProps;
nextProps = workInProgress.memoizedProps;
nextCache = context.value;
pushProvider(workInProgress, Component, nextCache);
nextCache = init.value;
pushProvider(workInProgress, elementType, nextCache);
if (null !== nextProps)
if (objectIs(nextProps.value, nextCache)) {
if (
nextProps.children === context.children &&
nextProps.children === init.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@@ -6738,39 +6724,35 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
} else propagateContextChange(workInProgress, Component, renderLanes);
reconcileChildren(
current,
workInProgress,
context.children,
renderLanes
);
} else
propagateContextChange(workInProgress, elementType, renderLanes);
reconcileChildren(current, workInProgress, init.children, renderLanes);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return (
(context = enableRenderableContext
(init = enableRenderableContext
? workInProgress.type._context
: workInProgress.type),
(Component = workInProgress.pendingProps.children),
(elementType = workInProgress.pendingProps.children),
prepareToReadContext(workInProgress, renderLanes),
(context = readContext(context)),
(Component = Component(context)),
(init = readContext(init)),
(elementType = elementType(init)),
(workInProgress.flags |= 1),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 14:
return (
(Component = workInProgress.type),
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
(context = resolveDefaultProps(Component.type, context)),
(elementType = workInProgress.type),
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
(init = resolveDefaultProps(elementType.type, init)),
updateMemoComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6784,24 +6766,24 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 17:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
(workInProgress.tag = 1),
isContextProvider(Component)
isContextProvider(elementType)
? ((current = !0), pushContextProvider(workInProgress))
: (current = !1),
prepareToReadContext(workInProgress, renderLanes),
constructClassInstance(workInProgress, Component, context),
mountClassInstance(workInProgress, Component, context, renderLanes),
constructClassInstance(workInProgress, elementType, init),
mountClassInstance(workInProgress, elementType, init, renderLanes),
finishClassComponent(
null,
workInProgress,
Component,
elementType,
!0,
current,
renderLanes
@@ -6814,39 +6796,39 @@ function beginWork(current, workInProgress, renderLanes) {
case 24:
return (
prepareToReadContext(workInProgress, renderLanes),
(Component = readContext(CacheContext)),
(elementType = readContext(CacheContext)),
null === current
? ((context = peekCacheFromPool()),
null === context &&
((context = workInProgressRoot),
? ((init = peekCacheFromPool()),
null === init &&
((init = workInProgressRoot),
(nextProps = createCache()),
(context.pooledCache = nextProps),
(init.pooledCache = nextProps),
nextProps.refCount++,
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
(context = nextProps)),
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
(init = nextProps)),
(workInProgress.memoizedState = {
parent: Component,
cache: context
parent: elementType,
cache: init
}),
initializeUpdateQueue(workInProgress),
pushProvider(workInProgress, CacheContext, context))
pushProvider(workInProgress, CacheContext, init))
: (0 !== (current.lanes & renderLanes) &&
(cloneUpdateQueue(current, workInProgress),
processUpdateQueue(workInProgress, null, null, renderLanes),
suspendIfUpdateReadFromEntangledAsyncAction()),
(context = current.memoizedState),
(init = current.memoizedState),
(nextProps = workInProgress.memoizedState),
context.parent !== Component
? ((context = { parent: Component, cache: Component }),
(workInProgress.memoizedState = context),
init.parent !== elementType
? ((init = { parent: elementType, cache: elementType }),
(workInProgress.memoizedState = init),
0 === workInProgress.lanes &&
(workInProgress.memoizedState =
workInProgress.updateQueue.baseState =
context),
pushProvider(workInProgress, CacheContext, Component))
: ((Component = nextProps.cache),
pushProvider(workInProgress, CacheContext, Component),
Component !== context.cache &&
init),
pushProvider(workInProgress, CacheContext, elementType))
: ((elementType = nextProps.cache),
pushProvider(workInProgress, CacheContext, elementType),
elementType !== init.cache &&
propagateContextChange(
workInProgress,
CacheContext,
@@ -7243,7 +7225,6 @@ function bubbleProperties(completedWork) {
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
case 2:
case 16:
case 15:
case 0:
@@ -9637,8 +9618,6 @@ function performUnitOfWork(unitOfWork) {
function replaySuspendedUnitOfWork(unitOfWork) {
var current = unitOfWork.alternate;
switch (unitOfWork.tag) {
case 2:
unitOfWork.tag = 0;
case 15:
case 0:
var Component = unitOfWork.type,
@@ -10110,16 +10089,6 @@ function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component)
return shouldConstruct(Component) ? 1 : 0;
if (void 0 !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress
@@ -10197,7 +10166,7 @@ function createFiberFromTypeAndProps(
mode,
lanes
) {
var fiberTag = 2;
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type) fiberTag = 5;
@@ -10636,10 +10605,10 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
devToolsConfig$jscomp$inline_1104 = {
devToolsConfig$jscomp$inline_1090 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-canary-c845e507",
version: "19.0.0-canary-d52afae6",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10655,11 +10624,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
var internals$jscomp$inline_1341 = {
bundleType: devToolsConfig$jscomp$inline_1104.bundleType,
version: devToolsConfig$jscomp$inline_1104.version,
rendererPackageName: devToolsConfig$jscomp$inline_1104.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1104.rendererConfig,
var internals$jscomp$inline_1324 = {
bundleType: devToolsConfig$jscomp$inline_1090.bundleType,
version: devToolsConfig$jscomp$inline_1090.version,
rendererPackageName: devToolsConfig$jscomp$inline_1090.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1090.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -10675,26 +10644,26 @@ var internals$jscomp$inline_1341 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1104.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1090.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-c845e507"
reconcilerVersion: "19.0.0-canary-d52afae6"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1342 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1325 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1342.isDisabled &&
hook$jscomp$inline_1342.supportsFiber
!hook$jscomp$inline_1325.isDisabled &&
hook$jscomp$inline_1325.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1342.inject(
internals$jscomp$inline_1341
(rendererID = hook$jscomp$inline_1325.inject(
internals$jscomp$inline_1324
)),
(injectedHook = hook$jscomp$inline_1342);
(injectedHook = hook$jscomp$inline_1325);
} catch (err) {}
}
exports.createPortal = function (children, containerTag) {
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<48687683c293fb45d02204564978a6b7>>
* @generated SignedSource<<5e0c58c3be0c39fa62556d95d99f1f0d>>
*/
"use strict";
@@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_262 = {
var injectedNamesToPlugins$jscomp$inline_261 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_262 = {
}
}
},
isOrderingDirty$jscomp$inline_263 = !1,
pluginName$jscomp$inline_264;
for (pluginName$jscomp$inline_264 in injectedNamesToPlugins$jscomp$inline_262)
isOrderingDirty$jscomp$inline_262 = !1,
pluginName$jscomp$inline_263;
for (pluginName$jscomp$inline_263 in injectedNamesToPlugins$jscomp$inline_261)
if (
injectedNamesToPlugins$jscomp$inline_262.hasOwnProperty(
pluginName$jscomp$inline_264
injectedNamesToPlugins$jscomp$inline_261.hasOwnProperty(
pluginName$jscomp$inline_263
)
) {
var pluginModule$jscomp$inline_265 =
injectedNamesToPlugins$jscomp$inline_262[pluginName$jscomp$inline_264];
var pluginModule$jscomp$inline_264 =
injectedNamesToPlugins$jscomp$inline_261[pluginName$jscomp$inline_263];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_264) ||
namesToPlugins[pluginName$jscomp$inline_264] !==
pluginModule$jscomp$inline_265
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_263) ||
namesToPlugins[pluginName$jscomp$inline_263] !==
pluginModule$jscomp$inline_264
) {
if (namesToPlugins[pluginName$jscomp$inline_264])
if (namesToPlugins[pluginName$jscomp$inline_263])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
(pluginName$jscomp$inline_264 + "`.")
(pluginName$jscomp$inline_263 + "`.")
);
namesToPlugins[pluginName$jscomp$inline_264] =
pluginModule$jscomp$inline_265;
isOrderingDirty$jscomp$inline_263 = !0;
namesToPlugins[pluginName$jscomp$inline_263] =
pluginModule$jscomp$inline_264;
isOrderingDirty$jscomp$inline_262 = !0;
}
}
isOrderingDirty$jscomp$inline_263 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_262 && recomputePluginOrdering();
var emptyObject$1 = {},
removedKeys = null,
removedKeyCount = 0,
@@ -1901,7 +1901,6 @@ function getComponentNameFromFiber(fiber) {
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof type)
@@ -2896,7 +2895,6 @@ function describeFiber(fiber) {
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 2:
case 15:
return describeFunctionComponentFrame(fiber.type);
case 11:
@@ -6711,114 +6709,95 @@ function beginWork(current, workInProgress, renderLanes) {
else didReceiveUpdate = !1;
workInProgress.lanes = 0;
switch (workInProgress.tag) {
case 2:
var Component = workInProgress.type;
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
var context = getMaskedContext(
workInProgress,
contextStackCursor$1.current
);
prepareToReadContext(workInProgress, renderLanes);
markComponentRenderStarted(workInProgress);
current = renderWithHooks(
null,
workInProgress,
Component,
current,
context,
renderLanes
);
markComponentRenderStopped();
workInProgress.flags |= 1;
workInProgress.tag = 0;
reconcileChildren(null, workInProgress, current, renderLanes);
workInProgress = workInProgress.child;
return workInProgress;
case 16:
Component = workInProgress.elementType;
var elementType = workInProgress.elementType;
a: {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
context = Component._init;
Component = context(Component._payload);
workInProgress.type = Component;
context = workInProgress.tag = resolveLazyComponentTag(Component);
current = resolveDefaultProps(Component, current);
switch (context) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 1:
workInProgress = updateClassComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 11:
workInProgress = updateForwardRef(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 14:
workInProgress = updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, current),
renderLanes
);
break a;
var init = elementType._init;
elementType = init(elementType._payload);
workInProgress.type = elementType;
current = resolveDefaultProps(elementType, current);
if ("function" === typeof elementType)
shouldConstruct(elementType)
? ((workInProgress.tag = 1),
(workInProgress = updateClassComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)))
: ((workInProgress.tag = 0),
(workInProgress = updateFunctionComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)));
else {
if (void 0 !== elementType && null !== elementType)
if (
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
) {
workInProgress.tag = 11;
workInProgress = updateForwardRef(
null,
workInProgress,
elementType,
current,
renderLanes
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress.tag = 14;
workInProgress = updateMemoComponent(
null,
workInProgress,
elementType,
resolveDefaultProps(elementType.type, current),
renderLanes
);
break a;
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
elementType +
". Lazy element type must resolve to a class or function."
);
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
Component +
". Lazy element type must resolve to a class or function."
);
}
return workInProgress;
case 0:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateFunctionComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
case 1:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateClassComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6827,34 +6806,34 @@ function beginWork(current, workInProgress, renderLanes) {
if (null === current)
throw Error("Should have a current fiber. This is a bug in React.");
var nextProps = workInProgress.pendingProps;
context = workInProgress.memoizedState;
Component = context.element;
init = workInProgress.memoizedState;
elementType = init.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
nextProps = workInProgress.memoizedState;
var nextCache = nextProps.cache;
pushProvider(workInProgress, CacheContext, nextCache);
nextCache !== context.cache &&
nextCache !== init.cache &&
propagateContextChange(workInProgress, CacheContext, renderLanes);
suspendIfUpdateReadFromEntangledAsyncAction();
context = nextProps.element;
context === Component
init = nextProps.element;
init === elementType
? (workInProgress = bailoutOnAlreadyFinishedWork(
current,
workInProgress,
renderLanes
))
: (reconcileChildren(current, workInProgress, context, renderLanes),
: (reconcileChildren(current, workInProgress, init, renderLanes),
(workInProgress = workInProgress.child));
return workInProgress;
case 26:
case 27:
case 5:
pushHostContext(workInProgress);
Component = workInProgress.pendingProps.children;
elementType = workInProgress.pendingProps.children;
if (enableAsyncActions && null !== workInProgress.memoizedState) {
if (!enableAsyncActions) throw Error("Not implemented.");
context = renderWithHooks(
init = renderWithHooks(
current,
workInProgress,
TransitionAwareHostComponent,
@@ -6862,10 +6841,10 @@ function beginWork(current, workInProgress, renderLanes) {
null,
renderLanes
);
HostTransitionContext._currentValue2 = context;
HostTransitionContext._currentValue2 = init;
didReceiveUpdate &&
null !== current &&
current.memoizedState.memoizedState !== context &&
current.memoizedState.memoizedState !== init &&
propagateContextChange(
workInProgress,
HostTransitionContext,
@@ -6873,7 +6852,7 @@ function beginWork(current, workInProgress, renderLanes) {
);
}
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, Component, renderLanes);
reconcileChildren(current, workInProgress, elementType, renderLanes);
return workInProgress.child;
case 6:
return null;
@@ -6885,30 +6864,35 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress,
workInProgress.stateNode.containerInfo
),
(Component = workInProgress.pendingProps),
(elementType = workInProgress.pendingProps),
null === current
? (workInProgress.child = reconcileChildFibers(
workInProgress,
null,
Component,
elementType,
renderLanes
))
: reconcileChildren(current, workInProgress, Component, renderLanes),
: reconcileChildren(
current,
workInProgress,
elementType,
renderLanes
),
workInProgress.child
);
case 11:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateForwardRef(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6935,9 +6919,9 @@ function beginWork(current, workInProgress, renderLanes) {
case 12:
return (
(workInProgress.flags |= 4),
(Component = workInProgress.stateNode),
(Component.effectDuration = 0),
(Component.passiveEffectDuration = 0),
(elementType = workInProgress.stateNode),
(elementType.effectDuration = 0),
(elementType.passiveEffectDuration = 0),
reconcileChildren(
current,
workInProgress,
@@ -6948,17 +6932,17 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 10:
a: {
Component = enableRenderableContext
elementType = enableRenderableContext
? workInProgress.type
: workInProgress.type._context;
context = workInProgress.pendingProps;
init = workInProgress.pendingProps;
nextProps = workInProgress.memoizedProps;
nextCache = context.value;
pushProvider(workInProgress, Component, nextCache);
nextCache = init.value;
pushProvider(workInProgress, elementType, nextCache);
if (null !== nextProps)
if (objectIs(nextProps.value, nextCache)) {
if (
nextProps.children === context.children &&
nextProps.children === init.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@@ -6968,41 +6952,37 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
} else propagateContextChange(workInProgress, Component, renderLanes);
reconcileChildren(
current,
workInProgress,
context.children,
renderLanes
);
} else
propagateContextChange(workInProgress, elementType, renderLanes);
reconcileChildren(current, workInProgress, init.children, renderLanes);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return (
(context = enableRenderableContext
(init = enableRenderableContext
? workInProgress.type._context
: workInProgress.type),
(Component = workInProgress.pendingProps.children),
(elementType = workInProgress.pendingProps.children),
prepareToReadContext(workInProgress, renderLanes),
(context = readContext(context)),
(init = readContext(init)),
markComponentRenderStarted(workInProgress),
(Component = Component(context)),
(elementType = elementType(init)),
markComponentRenderStopped(),
(workInProgress.flags |= 1),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 14:
return (
(Component = workInProgress.type),
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
(context = resolveDefaultProps(Component.type, context)),
(elementType = workInProgress.type),
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
(init = resolveDefaultProps(elementType.type, init)),
updateMemoComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -7016,24 +6996,24 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 17:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
(workInProgress.tag = 1),
isContextProvider(Component)
isContextProvider(elementType)
? ((current = !0), pushContextProvider(workInProgress))
: (current = !1),
prepareToReadContext(workInProgress, renderLanes),
constructClassInstance(workInProgress, Component, context),
mountClassInstance(workInProgress, Component, context, renderLanes),
constructClassInstance(workInProgress, elementType, init),
mountClassInstance(workInProgress, elementType, init, renderLanes),
finishClassComponent(
null,
workInProgress,
Component,
elementType,
!0,
current,
renderLanes
@@ -7046,39 +7026,39 @@ function beginWork(current, workInProgress, renderLanes) {
case 24:
return (
prepareToReadContext(workInProgress, renderLanes),
(Component = readContext(CacheContext)),
(elementType = readContext(CacheContext)),
null === current
? ((context = peekCacheFromPool()),
null === context &&
((context = workInProgressRoot),
? ((init = peekCacheFromPool()),
null === init &&
((init = workInProgressRoot),
(nextProps = createCache()),
(context.pooledCache = nextProps),
(init.pooledCache = nextProps),
nextProps.refCount++,
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
(context = nextProps)),
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
(init = nextProps)),
(workInProgress.memoizedState = {
parent: Component,
cache: context
parent: elementType,
cache: init
}),
initializeUpdateQueue(workInProgress),
pushProvider(workInProgress, CacheContext, context))
pushProvider(workInProgress, CacheContext, init))
: (0 !== (current.lanes & renderLanes) &&
(cloneUpdateQueue(current, workInProgress),
processUpdateQueue(workInProgress, null, null, renderLanes),
suspendIfUpdateReadFromEntangledAsyncAction()),
(context = current.memoizedState),
(init = current.memoizedState),
(nextProps = workInProgress.memoizedState),
context.parent !== Component
? ((context = { parent: Component, cache: Component }),
(workInProgress.memoizedState = context),
init.parent !== elementType
? ((init = { parent: elementType, cache: elementType }),
(workInProgress.memoizedState = init),
0 === workInProgress.lanes &&
(workInProgress.memoizedState =
workInProgress.updateQueue.baseState =
context),
pushProvider(workInProgress, CacheContext, Component))
: ((Component = nextProps.cache),
pushProvider(workInProgress, CacheContext, Component),
Component !== context.cache &&
init),
pushProvider(workInProgress, CacheContext, elementType))
: ((elementType = nextProps.cache),
pushProvider(workInProgress, CacheContext, elementType),
elementType !== init.cache &&
propagateContextChange(
workInProgress,
CacheContext,
@@ -7511,7 +7491,6 @@ function bubbleProperties(completedWork) {
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
case 2:
case 16:
case 15:
case 0:
@@ -10237,8 +10216,6 @@ function replaySuspendedUnitOfWork(unitOfWork) {
isProfilingMode = 0 !== (unitOfWork.mode & 2);
isProfilingMode && startProfilerTimer(unitOfWork);
switch (unitOfWork.tag) {
case 2:
unitOfWork.tag = 0;
case 15:
case 0:
var Component = unitOfWork.type,
@@ -10801,16 +10778,6 @@ function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component)
return shouldConstruct(Component) ? 1 : 0;
if (void 0 !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress
@@ -10896,7 +10863,7 @@ function createFiberFromTypeAndProps(
mode,
lanes
) {
var fiberTag = 2;
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type) fiberTag = 5;
@@ -11343,10 +11310,10 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
devToolsConfig$jscomp$inline_1186 = {
devToolsConfig$jscomp$inline_1172 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-canary-b92bb150",
version: "19.0.0-canary-c51895a2",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -11376,10 +11343,10 @@ var roots = new Map(),
} catch (err) {}
return hook.checkDCE ? !0 : !1;
})({
bundleType: devToolsConfig$jscomp$inline_1186.bundleType,
version: devToolsConfig$jscomp$inline_1186.version,
rendererPackageName: devToolsConfig$jscomp$inline_1186.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1186.rendererConfig,
bundleType: devToolsConfig$jscomp$inline_1172.bundleType,
version: devToolsConfig$jscomp$inline_1172.version,
rendererPackageName: devToolsConfig$jscomp$inline_1172.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1172.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -11395,14 +11362,14 @@ var roots = new Map(),
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1186.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1172.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-b92bb150"
reconcilerVersion: "19.0.0-canary-c51895a2"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<217faa179ec43aec470e31136cd73a9b>>
* @generated SignedSource<<610f862d94a502bcce7f0e734ffe7472>>
*/
"use strict";
@@ -993,8 +993,6 @@ if (__DEV__) {
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
@@ -2976,7 +2974,6 @@ to return true:wantsResponderID| |
case ClassComponent:
case FunctionComponent:
case IncompleteClassComponent:
case IndeterminateComponent:
case MemoComponent:
case SimpleMemoComponent:
if (typeof type === "function") {
@@ -6492,7 +6489,6 @@ to return true:wantsResponderID| |
return "SuspenseList";
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
var fn = fiber.type;
return fn.displayName || fn.name || null;
@@ -8887,7 +8883,6 @@ to return true:wantsResponderID| |
return describeBuiltInComponentFrame("SuspenseList", owner);
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
return describeFunctionComponentFrame(fiber.type, owner);
@@ -16386,17 +16381,6 @@ to return true:wantsResponderID| |
}
}
function adoptClassInstance(workInProgress, instance) {
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
}
function constructClassInstance(workInProgress, ctor, props) {
var isLegacyContextConsumer = false;
var unmaskedContext = emptyContextObject;
@@ -16472,7 +16456,14 @@ to return true:wantsResponderID| |
instance.state !== null && instance.state !== undefined
? instance.state
: null);
adoptClassInstance(workInProgress, instance);
instance.updater = classComponentUpdater;
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
set(instance, workInProgress);
{
instance._reactInternalInstance = fakeInternalInstance;
}
{
if (
@@ -17743,7 +17734,6 @@ to return true:wantsResponderID| |
);
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
@@ -17754,7 +17744,6 @@ to return true:wantsResponderID| |
{
didWarnAboutBadClass = {};
didWarnAboutModulePatternComponent = {};
didWarnAboutContextTypeOnFunctionComponent = {};
didWarnAboutGetDerivedStateOnFunctionComponent = {};
didWarnAboutFunctionRefs = {};
@@ -18375,6 +18364,39 @@ to return true:wantsResponderID| |
nextProps,
renderLanes
) {
{
if (
Component.prototype &&
typeof Component.prototype.render === "function"
) {
var componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
"This is likely to cause errors. Change %s to extend React.Component instead.",
componentName,
componentName
);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress,
null
);
}
if (current === null) {
// Some validations were previously done in mountIndeterminateComponent however and are now run
// in updateFuntionComponent but only on mount
validateFunctionComponentInDev(workInProgress, workInProgress.type);
}
}
var context;
{
@@ -18839,70 +18861,68 @@ to return true:wantsResponderID| |
var Component = init(payload); // Store the unwrapped component in the type.
workInProgress.type = Component;
var resolvedTag = (workInProgress.tag =
resolveLazyComponentTag(Component));
var resolvedProps = resolveDefaultProps(Component, props);
var child;
switch (resolvedTag) {
case FunctionComponent: {
if (typeof Component === "function") {
if (isFunctionClassComponent(Component)) {
workInProgress.tag = ClassComponent;
{
workInProgress.type = Component =
resolveClassForHotReloading(Component);
}
return updateClassComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
} else {
workInProgress.tag = FunctionComponent;
{
validateFunctionComponentInDev(workInProgress, Component);
workInProgress.type = Component =
resolveFunctionForHotReloading(Component);
}
child = updateFunctionComponent(
return updateFunctionComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
case ClassComponent: {
{
workInProgress.type = Component =
resolveClassForHotReloading(Component);
}
if ($$typeof === REACT_FORWARD_REF_TYPE) {
workInProgress.tag = ForwardRef;
child = updateClassComponent(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
case ForwardRef: {
{
workInProgress.type = Component =
resolveForwardRefForHotReloading(Component);
}
child = updateForwardRef(
return updateForwardRef(
null,
workInProgress,
Component,
resolvedProps,
renderLanes
);
return child;
}
case MemoComponent: {
child = updateMemoComponent(
} else if ($$typeof === REACT_MEMO_TYPE) {
workInProgress.tag = MemoComponent;
return updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
renderLanes
);
return child;
}
}
@@ -18964,119 +18984,6 @@ to return true:wantsResponderID| |
);
}
function mountIndeterminateComponent(
_current,
workInProgress,
Component,
renderLanes
) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
var props = workInProgress.pendingProps;
var context;
{
var unmaskedContext = getUnmaskedContext(
workInProgress,
Component,
false
);
context = getMaskedContext(workInProgress, unmaskedContext);
}
prepareToReadContext(workInProgress, renderLanes);
var value;
{
markComponentRenderStarted(workInProgress);
}
{
if (
Component.prototype &&
typeof Component.prototype.render === "function"
) {
var componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error(
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
"This is likely to cause errors. Change %s to extend React.Component instead.",
componentName,
componentName
);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(
workInProgress,
null
);
}
setIsRendering(true);
ReactCurrentOwner$2.current = workInProgress;
value = renderWithHooks(
null,
workInProgress,
Component,
props,
context,
renderLanes
);
setIsRendering(false);
}
{
markComponentRenderStopped();
} // React DevTools reads this flag.
workInProgress.flags |= PerformedWork;
{
// Support for module components is deprecated and is removed behind a flag.
// Whether or not it would crash later, we want to show a good message in DEV first.
if (
typeof value === "object" &&
value !== null &&
typeof value.render === "function" &&
value.$$typeof === undefined
) {
var _componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutModulePatternComponent[_componentName]) {
error(
"The <%s /> component appears to be a function component that returns a class instance. " +
"Change %s to a class that extends React.Component instead. " +
"If you can't use a class try assigning the prototype on the function as a workaround. " +
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
"cannot be called with `new` by React.",
_componentName,
_componentName,
_componentName
);
didWarnAboutModulePatternComponent[_componentName] = true;
}
}
}
{
// Proceed under the assumption that this is a function component
workInProgress.tag = FunctionComponent;
reconcileChildren(null, workInProgress, value, renderLanes);
{
validateFunctionComponentInDev(workInProgress, Component);
}
return workInProgress.child;
}
}
function validateFunctionComponentInDev(workInProgress, Component) {
{
if (Component) {
@@ -19113,33 +19020,32 @@ to return true:wantsResponderID| |
}
if (Component.defaultProps !== undefined) {
var _componentName3 =
getComponentNameFromType(Component) || "Unknown";
var _componentName = getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName3]) {
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
error(
"%s: Support for defaultProps will be removed from function components " +
"in a future major release. Use JavaScript default parameters instead.",
_componentName3
_componentName
);
didWarnAboutDefaultPropsOnFunctionComponent[_componentName3] = true;
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
}
}
if (typeof Component.getDerivedStateFromProps === "function") {
var _componentName4 =
var _componentName2 =
getComponentNameFromType(Component) || "Unknown";
if (
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4]
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
) {
error(
"%s: Function components do not support getDerivedStateFromProps.",
_componentName4
_componentName2
);
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName4] =
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
true;
}
}
@@ -19148,16 +19054,16 @@ to return true:wantsResponderID| |
typeof Component.contextType === "object" &&
Component.contextType !== null
) {
var _componentName5 =
var _componentName3 =
getComponentNameFromType(Component) || "Unknown";
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName5]) {
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
error(
"%s: Function components do not support contextType.",
_componentName5
_componentName3
);
didWarnAboutContextTypeOnFunctionComponent[_componentName5] = true;
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
}
}
}
@@ -20889,15 +20795,6 @@ to return true:wantsResponderID| |
workInProgress.lanes = NoLanes;
switch (workInProgress.tag) {
case IndeterminateComponent: {
return mountIndeterminateComponent(
current,
workInProgress,
workInProgress.type,
renderLanes
);
}
case LazyComponent: {
var elementType = workInProgress.elementType;
return mountLazyComponent(
@@ -22045,7 +21942,6 @@ to return true:wantsResponderID| |
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
switch (workInProgress.tag) {
case IndeterminateComponent:
case LazyComponent:
case SimpleMemoComponent:
case FunctionComponent:
@@ -28280,12 +28176,6 @@ to return true:wantsResponderID| |
}
switch (unitOfWork.tag) {
case IndeterminateComponent: {
// Because it suspended with `use`, we can assume it's a
// function component.
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
}
case SimpleMemoComponent:
case FunctionComponent: {
// Resolve `defaultProps`. This logic is copied from `beginWork`.
@@ -29594,7 +29484,6 @@ to return true:wantsResponderID| |
var tag = fiber.tag;
if (
tag !== IndeterminateComponent &&
tag !== HostRoot &&
tag !== ClassComponent &&
tag !== FunctionComponent &&
@@ -30393,22 +30282,8 @@ to return true:wantsResponderID| |
type.defaultProps === undefined
);
}
function resolveLazyComponentTag(Component) {
if (typeof Component === "function") {
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
if ($$typeof === REACT_FORWARD_REF_TYPE) {
return ForwardRef;
}
if ($$typeof === REACT_MEMO_TYPE) {
return MemoComponent;
}
}
return IndeterminateComponent;
function isFunctionClassComponent(type) {
return shouldConstruct(type);
} // This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps) {
@@ -30493,7 +30368,6 @@ to return true:wantsResponderID| |
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
switch (workInProgress.tag) {
case IndeterminateComponent:
case FunctionComponent:
case SimpleMemoComponent:
workInProgress.type = resolveFunctionForHotReloading(current.type);
@@ -30612,7 +30486,7 @@ to return true:wantsResponderID| |
mode,
lanes
) {
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var resolvedType = type;
@@ -31023,7 +30897,7 @@ to return true:wantsResponderID| |
return root;
}
var ReactVersion = "19.0.0-canary-59bec1ad";
var ReactVersion = "19.0.0-canary-10db70a4";
function createPortal$1(
children,
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<41450bae9ba9bf1c2816655a8856184d>>
* @generated SignedSource<<42abf16682357ce3e26053a1231d69e5>>
*/
"use strict";
@@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_253 = {
var injectedNamesToPlugins$jscomp$inline_252 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_253 = {
}
}
},
isOrderingDirty$jscomp$inline_254 = !1,
pluginName$jscomp$inline_255;
for (pluginName$jscomp$inline_255 in injectedNamesToPlugins$jscomp$inline_253)
isOrderingDirty$jscomp$inline_253 = !1,
pluginName$jscomp$inline_254;
for (pluginName$jscomp$inline_254 in injectedNamesToPlugins$jscomp$inline_252)
if (
injectedNamesToPlugins$jscomp$inline_253.hasOwnProperty(
pluginName$jscomp$inline_255
injectedNamesToPlugins$jscomp$inline_252.hasOwnProperty(
pluginName$jscomp$inline_254
)
) {
var pluginModule$jscomp$inline_256 =
injectedNamesToPlugins$jscomp$inline_253[pluginName$jscomp$inline_255];
var pluginModule$jscomp$inline_255 =
injectedNamesToPlugins$jscomp$inline_252[pluginName$jscomp$inline_254];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_255) ||
namesToPlugins[pluginName$jscomp$inline_255] !==
pluginModule$jscomp$inline_256
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_254) ||
namesToPlugins[pluginName$jscomp$inline_254] !==
pluginModule$jscomp$inline_255
) {
if (namesToPlugins[pluginName$jscomp$inline_255])
if (namesToPlugins[pluginName$jscomp$inline_254])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
(pluginName$jscomp$inline_255 + "`.")
(pluginName$jscomp$inline_254 + "`.")
);
namesToPlugins[pluginName$jscomp$inline_255] =
pluginModule$jscomp$inline_256;
isOrderingDirty$jscomp$inline_254 = !0;
namesToPlugins[pluginName$jscomp$inline_254] =
pluginModule$jscomp$inline_255;
isOrderingDirty$jscomp$inline_253 = !0;
}
}
isOrderingDirty$jscomp$inline_254 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_253 && recomputePluginOrdering();
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
@@ -1267,7 +1267,6 @@ function getComponentNameFromFiber(fiber) {
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof type)
@@ -2839,7 +2838,6 @@ function describeFiber(fiber) {
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 2:
case 15:
return describeFunctionComponentFrame(fiber.type);
case 11:
@@ -6552,112 +6550,95 @@ function beginWork(current, workInProgress, renderLanes) {
else didReceiveUpdate = !1;
workInProgress.lanes = 0;
switch (workInProgress.tag) {
case 2:
var Component = workInProgress.type;
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
var context = getMaskedContext(
workInProgress,
contextStackCursor$1.current
);
prepareToReadContext(workInProgress, renderLanes);
current = renderWithHooks(
null,
workInProgress,
Component,
current,
context,
renderLanes
);
workInProgress.flags |= 1;
workInProgress.tag = 0;
reconcileChildren(null, workInProgress, current, renderLanes);
workInProgress = workInProgress.child;
return workInProgress;
case 16:
Component = workInProgress.elementType;
var elementType = workInProgress.elementType;
a: {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
context = Component._init;
Component = context(Component._payload);
workInProgress.type = Component;
context = workInProgress.tag = resolveLazyComponentTag(Component);
current = resolveDefaultProps(Component, current);
switch (context) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 1:
workInProgress = updateClassComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 11:
workInProgress = updateForwardRef(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 14:
workInProgress = updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, current),
renderLanes
);
break a;
var init = elementType._init;
elementType = init(elementType._payload);
workInProgress.type = elementType;
current = resolveDefaultProps(elementType, current);
if ("function" === typeof elementType)
shouldConstruct(elementType)
? ((workInProgress.tag = 1),
(workInProgress = updateClassComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)))
: ((workInProgress.tag = 0),
(workInProgress = updateFunctionComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)));
else {
if (void 0 !== elementType && null !== elementType)
if (
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
) {
workInProgress.tag = 11;
workInProgress = updateForwardRef(
null,
workInProgress,
elementType,
current,
renderLanes
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress.tag = 14;
workInProgress = updateMemoComponent(
null,
workInProgress,
elementType,
resolveDefaultProps(elementType.type, current),
renderLanes
);
break a;
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
elementType +
". Lazy element type must resolve to a class or function."
);
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
Component +
". Lazy element type must resolve to a class or function."
);
}
return workInProgress;
case 0:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateFunctionComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
case 1:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateClassComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6666,34 +6647,34 @@ function beginWork(current, workInProgress, renderLanes) {
if (null === current)
throw Error("Should have a current fiber. This is a bug in React.");
var nextProps = workInProgress.pendingProps;
context = workInProgress.memoizedState;
Component = context.element;
init = workInProgress.memoizedState;
elementType = init.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
nextProps = workInProgress.memoizedState;
var nextCache = nextProps.cache;
pushProvider(workInProgress, CacheContext, nextCache);
nextCache !== context.cache &&
nextCache !== init.cache &&
propagateContextChange(workInProgress, CacheContext, renderLanes);
suspendIfUpdateReadFromEntangledAsyncAction();
context = nextProps.element;
context === Component
init = nextProps.element;
init === elementType
? (workInProgress = bailoutOnAlreadyFinishedWork(
current,
workInProgress,
renderLanes
))
: (reconcileChildren(current, workInProgress, context, renderLanes),
: (reconcileChildren(current, workInProgress, init, renderLanes),
(workInProgress = workInProgress.child));
return workInProgress;
case 26:
case 27:
case 5:
pushHostContext(workInProgress);
Component = workInProgress.pendingProps.children;
elementType = workInProgress.pendingProps.children;
if (enableAsyncActions && null !== workInProgress.memoizedState) {
if (!enableAsyncActions) throw Error("Not implemented.");
context = renderWithHooks(
init = renderWithHooks(
current,
workInProgress,
TransitionAwareHostComponent,
@@ -6701,10 +6682,10 @@ function beginWork(current, workInProgress, renderLanes) {
null,
renderLanes
);
HostTransitionContext._currentValue = context;
HostTransitionContext._currentValue = init;
didReceiveUpdate &&
null !== current &&
current.memoizedState.memoizedState !== context &&
current.memoizedState.memoizedState !== init &&
propagateContextChange(
workInProgress,
HostTransitionContext,
@@ -6712,7 +6693,7 @@ function beginWork(current, workInProgress, renderLanes) {
);
}
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, Component, renderLanes);
reconcileChildren(current, workInProgress, elementType, renderLanes);
return workInProgress.child;
case 6:
return null;
@@ -6724,30 +6705,35 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress,
workInProgress.stateNode.containerInfo
),
(Component = workInProgress.pendingProps),
(elementType = workInProgress.pendingProps),
null === current
? (workInProgress.child = reconcileChildFibers(
workInProgress,
null,
Component,
elementType,
renderLanes
))
: reconcileChildren(current, workInProgress, Component, renderLanes),
: reconcileChildren(
current,
workInProgress,
elementType,
renderLanes
),
workInProgress.child
);
case 11:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateForwardRef(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6783,17 +6769,17 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 10:
a: {
Component = enableRenderableContext
elementType = enableRenderableContext
? workInProgress.type
: workInProgress.type._context;
context = workInProgress.pendingProps;
init = workInProgress.pendingProps;
nextProps = workInProgress.memoizedProps;
nextCache = context.value;
pushProvider(workInProgress, Component, nextCache);
nextCache = init.value;
pushProvider(workInProgress, elementType, nextCache);
if (null !== nextProps)
if (objectIs(nextProps.value, nextCache)) {
if (
nextProps.children === context.children &&
nextProps.children === init.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@@ -6803,39 +6789,35 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
} else propagateContextChange(workInProgress, Component, renderLanes);
reconcileChildren(
current,
workInProgress,
context.children,
renderLanes
);
} else
propagateContextChange(workInProgress, elementType, renderLanes);
reconcileChildren(current, workInProgress, init.children, renderLanes);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return (
(context = enableRenderableContext
(init = enableRenderableContext
? workInProgress.type._context
: workInProgress.type),
(Component = workInProgress.pendingProps.children),
(elementType = workInProgress.pendingProps.children),
prepareToReadContext(workInProgress, renderLanes),
(context = readContext(context)),
(Component = Component(context)),
(init = readContext(init)),
(elementType = elementType(init)),
(workInProgress.flags |= 1),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 14:
return (
(Component = workInProgress.type),
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
(context = resolveDefaultProps(Component.type, context)),
(elementType = workInProgress.type),
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
(init = resolveDefaultProps(elementType.type, init)),
updateMemoComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6849,24 +6831,24 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 17:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
(workInProgress.tag = 1),
isContextProvider(Component)
isContextProvider(elementType)
? ((current = !0), pushContextProvider(workInProgress))
: (current = !1),
prepareToReadContext(workInProgress, renderLanes),
constructClassInstance(workInProgress, Component, context),
mountClassInstance(workInProgress, Component, context, renderLanes),
constructClassInstance(workInProgress, elementType, init),
mountClassInstance(workInProgress, elementType, init, renderLanes),
finishClassComponent(
null,
workInProgress,
Component,
elementType,
!0,
current,
renderLanes
@@ -6879,39 +6861,39 @@ function beginWork(current, workInProgress, renderLanes) {
case 24:
return (
prepareToReadContext(workInProgress, renderLanes),
(Component = readContext(CacheContext)),
(elementType = readContext(CacheContext)),
null === current
? ((context = peekCacheFromPool()),
null === context &&
((context = workInProgressRoot),
? ((init = peekCacheFromPool()),
null === init &&
((init = workInProgressRoot),
(nextProps = createCache()),
(context.pooledCache = nextProps),
(init.pooledCache = nextProps),
nextProps.refCount++,
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
(context = nextProps)),
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
(init = nextProps)),
(workInProgress.memoizedState = {
parent: Component,
cache: context
parent: elementType,
cache: init
}),
initializeUpdateQueue(workInProgress),
pushProvider(workInProgress, CacheContext, context))
pushProvider(workInProgress, CacheContext, init))
: (0 !== (current.lanes & renderLanes) &&
(cloneUpdateQueue(current, workInProgress),
processUpdateQueue(workInProgress, null, null, renderLanes),
suspendIfUpdateReadFromEntangledAsyncAction()),
(context = current.memoizedState),
(init = current.memoizedState),
(nextProps = workInProgress.memoizedState),
context.parent !== Component
? ((context = { parent: Component, cache: Component }),
(workInProgress.memoizedState = context),
init.parent !== elementType
? ((init = { parent: elementType, cache: elementType }),
(workInProgress.memoizedState = init),
0 === workInProgress.lanes &&
(workInProgress.memoizedState =
workInProgress.updateQueue.baseState =
context),
pushProvider(workInProgress, CacheContext, Component))
: ((Component = nextProps.cache),
pushProvider(workInProgress, CacheContext, Component),
Component !== context.cache &&
init),
pushProvider(workInProgress, CacheContext, elementType))
: ((elementType = nextProps.cache),
pushProvider(workInProgress, CacheContext, elementType),
elementType !== init.cache &&
propagateContextChange(
workInProgress,
CacheContext,
@@ -7197,7 +7179,6 @@ function bubbleProperties(completedWork) {
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
case 2:
case 16:
case 15:
case 0:
@@ -9846,8 +9827,6 @@ function performUnitOfWork(unitOfWork) {
function replaySuspendedUnitOfWork(unitOfWork) {
var current = unitOfWork.alternate;
switch (unitOfWork.tag) {
case 2:
unitOfWork.tag = 0;
case 15:
case 0:
var Component = unitOfWork.type,
@@ -10319,16 +10298,6 @@ function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component)
return shouldConstruct(Component) ? 1 : 0;
if (void 0 !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress
@@ -10406,7 +10375,7 @@ function createFiberFromTypeAndProps(
mode,
lanes
) {
var fiberTag = 2;
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type) fiberTag = 5;
@@ -10852,10 +10821,10 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
devToolsConfig$jscomp$inline_1171 = {
devToolsConfig$jscomp$inline_1157 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-canary-08707297",
version: "19.0.0-canary-9504c155",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10871,11 +10840,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
var internals$jscomp$inline_1422 = {
bundleType: devToolsConfig$jscomp$inline_1171.bundleType,
version: devToolsConfig$jscomp$inline_1171.version,
rendererPackageName: devToolsConfig$jscomp$inline_1171.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1171.rendererConfig,
var internals$jscomp$inline_1405 = {
bundleType: devToolsConfig$jscomp$inline_1157.bundleType,
version: devToolsConfig$jscomp$inline_1157.version,
rendererPackageName: devToolsConfig$jscomp$inline_1157.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1157.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -10891,26 +10860,26 @@ var internals$jscomp$inline_1422 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1171.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1157.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-08707297"
reconcilerVersion: "19.0.0-canary-9504c155"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1423 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1406 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1423.isDisabled &&
hook$jscomp$inline_1423.supportsFiber
!hook$jscomp$inline_1406.isDisabled &&
hook$jscomp$inline_1406.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1423.inject(
internals$jscomp$inline_1422
(rendererID = hook$jscomp$inline_1406.inject(
internals$jscomp$inline_1405
)),
(injectedHook = hook$jscomp$inline_1423);
(injectedHook = hook$jscomp$inline_1406);
} catch (err) {}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d630fe2014dc062eb309863c2aa85786>>
* @generated SignedSource<<99b117fbe29590e38574e17bf42322b6>>
*/
"use strict";
@@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_269 = {
var injectedNamesToPlugins$jscomp$inline_268 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_269 = {
}
}
},
isOrderingDirty$jscomp$inline_270 = !1,
pluginName$jscomp$inline_271;
for (pluginName$jscomp$inline_271 in injectedNamesToPlugins$jscomp$inline_269)
isOrderingDirty$jscomp$inline_269 = !1,
pluginName$jscomp$inline_270;
for (pluginName$jscomp$inline_270 in injectedNamesToPlugins$jscomp$inline_268)
if (
injectedNamesToPlugins$jscomp$inline_269.hasOwnProperty(
pluginName$jscomp$inline_271
injectedNamesToPlugins$jscomp$inline_268.hasOwnProperty(
pluginName$jscomp$inline_270
)
) {
var pluginModule$jscomp$inline_272 =
injectedNamesToPlugins$jscomp$inline_269[pluginName$jscomp$inline_271];
var pluginModule$jscomp$inline_271 =
injectedNamesToPlugins$jscomp$inline_268[pluginName$jscomp$inline_270];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_271) ||
namesToPlugins[pluginName$jscomp$inline_271] !==
pluginModule$jscomp$inline_272
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_270) ||
namesToPlugins[pluginName$jscomp$inline_270] !==
pluginModule$jscomp$inline_271
) {
if (namesToPlugins[pluginName$jscomp$inline_271])
if (namesToPlugins[pluginName$jscomp$inline_270])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
(pluginName$jscomp$inline_271 + "`.")
(pluginName$jscomp$inline_270 + "`.")
);
namesToPlugins[pluginName$jscomp$inline_271] =
pluginModule$jscomp$inline_272;
isOrderingDirty$jscomp$inline_270 = !0;
namesToPlugins[pluginName$jscomp$inline_270] =
pluginModule$jscomp$inline_271;
isOrderingDirty$jscomp$inline_269 = !0;
}
}
isOrderingDirty$jscomp$inline_270 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_269 && recomputePluginOrdering();
var instanceCache = new Map(),
instanceProps = new Map();
function getInstanceFromTag(tag) {
@@ -1271,7 +1271,6 @@ function getComponentNameFromFiber(fiber) {
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" === typeof type)
@@ -2961,7 +2960,6 @@ function describeFiber(fiber) {
case 19:
return describeBuiltInComponentFrame("SuspenseList");
case 0:
case 2:
case 15:
return describeFunctionComponentFrame(fiber.type);
case 11:
@@ -6776,114 +6774,95 @@ function beginWork(current, workInProgress, renderLanes) {
else didReceiveUpdate = !1;
workInProgress.lanes = 0;
switch (workInProgress.tag) {
case 2:
var Component = workInProgress.type;
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
var context = getMaskedContext(
workInProgress,
contextStackCursor$1.current
);
prepareToReadContext(workInProgress, renderLanes);
markComponentRenderStarted(workInProgress);
current = renderWithHooks(
null,
workInProgress,
Component,
current,
context,
renderLanes
);
markComponentRenderStopped();
workInProgress.flags |= 1;
workInProgress.tag = 0;
reconcileChildren(null, workInProgress, current, renderLanes);
workInProgress = workInProgress.child;
return workInProgress;
case 16:
Component = workInProgress.elementType;
var elementType = workInProgress.elementType;
a: {
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
current = workInProgress.pendingProps;
context = Component._init;
Component = context(Component._payload);
workInProgress.type = Component;
context = workInProgress.tag = resolveLazyComponentTag(Component);
current = resolveDefaultProps(Component, current);
switch (context) {
case 0:
workInProgress = updateFunctionComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 1:
workInProgress = updateClassComponent(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 11:
workInProgress = updateForwardRef(
null,
workInProgress,
Component,
current,
renderLanes
);
break a;
case 14:
workInProgress = updateMemoComponent(
null,
workInProgress,
Component,
resolveDefaultProps(Component.type, current),
renderLanes
);
break a;
var init = elementType._init;
elementType = init(elementType._payload);
workInProgress.type = elementType;
current = resolveDefaultProps(elementType, current);
if ("function" === typeof elementType)
shouldConstruct(elementType)
? ((workInProgress.tag = 1),
(workInProgress = updateClassComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)))
: ((workInProgress.tag = 0),
(workInProgress = updateFunctionComponent(
null,
workInProgress,
elementType,
current,
renderLanes
)));
else {
if (void 0 !== elementType && null !== elementType)
if (
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
) {
workInProgress.tag = 11;
workInProgress = updateForwardRef(
null,
workInProgress,
elementType,
current,
renderLanes
);
break a;
} else if (init === REACT_MEMO_TYPE) {
workInProgress.tag = 14;
workInProgress = updateMemoComponent(
null,
workInProgress,
elementType,
resolveDefaultProps(elementType.type, current),
renderLanes
);
break a;
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
elementType +
". Lazy element type must resolve to a class or function."
);
}
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
Component +
". Lazy element type must resolve to a class or function."
);
}
return workInProgress;
case 0:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateFunctionComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
case 1:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateClassComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -6892,34 +6871,34 @@ function beginWork(current, workInProgress, renderLanes) {
if (null === current)
throw Error("Should have a current fiber. This is a bug in React.");
var nextProps = workInProgress.pendingProps;
context = workInProgress.memoizedState;
Component = context.element;
init = workInProgress.memoizedState;
elementType = init.element;
cloneUpdateQueue(current, workInProgress);
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
nextProps = workInProgress.memoizedState;
var nextCache = nextProps.cache;
pushProvider(workInProgress, CacheContext, nextCache);
nextCache !== context.cache &&
nextCache !== init.cache &&
propagateContextChange(workInProgress, CacheContext, renderLanes);
suspendIfUpdateReadFromEntangledAsyncAction();
context = nextProps.element;
context === Component
init = nextProps.element;
init === elementType
? (workInProgress = bailoutOnAlreadyFinishedWork(
current,
workInProgress,
renderLanes
))
: (reconcileChildren(current, workInProgress, context, renderLanes),
: (reconcileChildren(current, workInProgress, init, renderLanes),
(workInProgress = workInProgress.child));
return workInProgress;
case 26:
case 27:
case 5:
pushHostContext(workInProgress);
Component = workInProgress.pendingProps.children;
elementType = workInProgress.pendingProps.children;
if (enableAsyncActions && null !== workInProgress.memoizedState) {
if (!enableAsyncActions) throw Error("Not implemented.");
context = renderWithHooks(
init = renderWithHooks(
current,
workInProgress,
TransitionAwareHostComponent,
@@ -6927,10 +6906,10 @@ function beginWork(current, workInProgress, renderLanes) {
null,
renderLanes
);
HostTransitionContext._currentValue = context;
HostTransitionContext._currentValue = init;
didReceiveUpdate &&
null !== current &&
current.memoizedState.memoizedState !== context &&
current.memoizedState.memoizedState !== init &&
propagateContextChange(
workInProgress,
HostTransitionContext,
@@ -6938,7 +6917,7 @@ function beginWork(current, workInProgress, renderLanes) {
);
}
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, Component, renderLanes);
reconcileChildren(current, workInProgress, elementType, renderLanes);
return workInProgress.child;
case 6:
return null;
@@ -6950,30 +6929,35 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress,
workInProgress.stateNode.containerInfo
),
(Component = workInProgress.pendingProps),
(elementType = workInProgress.pendingProps),
null === current
? (workInProgress.child = reconcileChildFibers(
workInProgress,
null,
Component,
elementType,
renderLanes
))
: reconcileChildren(current, workInProgress, Component, renderLanes),
: reconcileChildren(
current,
workInProgress,
elementType,
renderLanes
),
workInProgress.child
);
case 11:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
updateForwardRef(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -7000,9 +6984,9 @@ function beginWork(current, workInProgress, renderLanes) {
case 12:
return (
(workInProgress.flags |= 4),
(Component = workInProgress.stateNode),
(Component.effectDuration = 0),
(Component.passiveEffectDuration = 0),
(elementType = workInProgress.stateNode),
(elementType.effectDuration = 0),
(elementType.passiveEffectDuration = 0),
reconcileChildren(
current,
workInProgress,
@@ -7013,17 +6997,17 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 10:
a: {
Component = enableRenderableContext
elementType = enableRenderableContext
? workInProgress.type
: workInProgress.type._context;
context = workInProgress.pendingProps;
init = workInProgress.pendingProps;
nextProps = workInProgress.memoizedProps;
nextCache = context.value;
pushProvider(workInProgress, Component, nextCache);
nextCache = init.value;
pushProvider(workInProgress, elementType, nextCache);
if (null !== nextProps)
if (objectIs(nextProps.value, nextCache)) {
if (
nextProps.children === context.children &&
nextProps.children === init.children &&
!didPerformWorkStackCursor.current
) {
workInProgress = bailoutOnAlreadyFinishedWork(
@@ -7033,41 +7017,37 @@ function beginWork(current, workInProgress, renderLanes) {
);
break a;
}
} else propagateContextChange(workInProgress, Component, renderLanes);
reconcileChildren(
current,
workInProgress,
context.children,
renderLanes
);
} else
propagateContextChange(workInProgress, elementType, renderLanes);
reconcileChildren(current, workInProgress, init.children, renderLanes);
workInProgress = workInProgress.child;
}
return workInProgress;
case 9:
return (
(context = enableRenderableContext
(init = enableRenderableContext
? workInProgress.type._context
: workInProgress.type),
(Component = workInProgress.pendingProps.children),
(elementType = workInProgress.pendingProps.children),
prepareToReadContext(workInProgress, renderLanes),
(context = readContext(context)),
(init = readContext(init)),
markComponentRenderStarted(workInProgress),
(Component = Component(context)),
(elementType = elementType(init)),
markComponentRenderStopped(),
(workInProgress.flags |= 1),
reconcileChildren(current, workInProgress, Component, renderLanes),
reconcileChildren(current, workInProgress, elementType, renderLanes),
workInProgress.child
);
case 14:
return (
(Component = workInProgress.type),
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
(context = resolveDefaultProps(Component.type, context)),
(elementType = workInProgress.type),
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
(init = resolveDefaultProps(elementType.type, init)),
updateMemoComponent(
current,
workInProgress,
Component,
context,
elementType,
init,
renderLanes
)
);
@@ -7081,24 +7061,24 @@ function beginWork(current, workInProgress, renderLanes) {
);
case 17:
return (
(Component = workInProgress.type),
(context = workInProgress.pendingProps),
(context =
workInProgress.elementType === Component
? context
: resolveDefaultProps(Component, context)),
(elementType = workInProgress.type),
(init = workInProgress.pendingProps),
(init =
workInProgress.elementType === elementType
? init
: resolveDefaultProps(elementType, init)),
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
(workInProgress.tag = 1),
isContextProvider(Component)
isContextProvider(elementType)
? ((current = !0), pushContextProvider(workInProgress))
: (current = !1),
prepareToReadContext(workInProgress, renderLanes),
constructClassInstance(workInProgress, Component, context),
mountClassInstance(workInProgress, Component, context, renderLanes),
constructClassInstance(workInProgress, elementType, init),
mountClassInstance(workInProgress, elementType, init, renderLanes),
finishClassComponent(
null,
workInProgress,
Component,
elementType,
!0,
current,
renderLanes
@@ -7111,39 +7091,39 @@ function beginWork(current, workInProgress, renderLanes) {
case 24:
return (
prepareToReadContext(workInProgress, renderLanes),
(Component = readContext(CacheContext)),
(elementType = readContext(CacheContext)),
null === current
? ((context = peekCacheFromPool()),
null === context &&
((context = workInProgressRoot),
? ((init = peekCacheFromPool()),
null === init &&
((init = workInProgressRoot),
(nextProps = createCache()),
(context.pooledCache = nextProps),
(init.pooledCache = nextProps),
nextProps.refCount++,
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
(context = nextProps)),
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
(init = nextProps)),
(workInProgress.memoizedState = {
parent: Component,
cache: context
parent: elementType,
cache: init
}),
initializeUpdateQueue(workInProgress),
pushProvider(workInProgress, CacheContext, context))
pushProvider(workInProgress, CacheContext, init))
: (0 !== (current.lanes & renderLanes) &&
(cloneUpdateQueue(current, workInProgress),
processUpdateQueue(workInProgress, null, null, renderLanes),
suspendIfUpdateReadFromEntangledAsyncAction()),
(context = current.memoizedState),
(init = current.memoizedState),
(nextProps = workInProgress.memoizedState),
context.parent !== Component
? ((context = { parent: Component, cache: Component }),
(workInProgress.memoizedState = context),
init.parent !== elementType
? ((init = { parent: elementType, cache: elementType }),
(workInProgress.memoizedState = init),
0 === workInProgress.lanes &&
(workInProgress.memoizedState =
workInProgress.updateQueue.baseState =
context),
pushProvider(workInProgress, CacheContext, Component))
: ((Component = nextProps.cache),
pushProvider(workInProgress, CacheContext, Component),
Component !== context.cache &&
init),
pushProvider(workInProgress, CacheContext, elementType))
: ((elementType = nextProps.cache),
pushProvider(workInProgress, CacheContext, elementType),
elementType !== init.cache &&
propagateContextChange(
workInProgress,
CacheContext,
@@ -7465,7 +7445,6 @@ function bubbleProperties(completedWork) {
function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
case 2:
case 16:
case 15:
case 0:
@@ -10447,8 +10426,6 @@ function replaySuspendedUnitOfWork(unitOfWork) {
isProfilingMode = 0 !== (unitOfWork.mode & 2);
isProfilingMode && startProfilerTimer(unitOfWork);
switch (unitOfWork.tag) {
case 2:
unitOfWork.tag = 0;
case 15:
case 0:
var Component = unitOfWork.type,
@@ -11011,16 +10988,6 @@ function shouldConstruct(Component) {
Component = Component.prototype;
return !(!Component || !Component.isReactComponent);
}
function resolveLazyComponentTag(Component) {
if ("function" === typeof Component)
return shouldConstruct(Component) ? 1 : 0;
if (void 0 !== Component && null !== Component) {
Component = Component.$$typeof;
if (Component === REACT_FORWARD_REF_TYPE) return 11;
if (Component === REACT_MEMO_TYPE) return 14;
}
return 2;
}
function createWorkInProgress(current, pendingProps) {
var workInProgress = current.alternate;
null === workInProgress
@@ -11106,7 +11073,7 @@ function createFiberFromTypeAndProps(
mode,
lanes
) {
var fiberTag = 2;
var fiberTag = 0;
owner = type;
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
else if ("string" === typeof type) fiberTag = 5;
@@ -11560,10 +11527,10 @@ batchedUpdatesImpl = function (fn, a) {
}
};
var roots = new Map(),
devToolsConfig$jscomp$inline_1253 = {
devToolsConfig$jscomp$inline_1239 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-canary-c3d7585f",
version: "19.0.0-canary-3546d2bf",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -11593,10 +11560,10 @@ var roots = new Map(),
} catch (err) {}
return hook.checkDCE ? !0 : !1;
})({
bundleType: devToolsConfig$jscomp$inline_1253.bundleType,
version: devToolsConfig$jscomp$inline_1253.version,
rendererPackageName: devToolsConfig$jscomp$inline_1253.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1253.rendererConfig,
bundleType: devToolsConfig$jscomp$inline_1239.bundleType,
version: devToolsConfig$jscomp$inline_1239.version,
rendererPackageName: devToolsConfig$jscomp$inline_1239.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1239.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -11612,14 +11579,14 @@ var roots = new Map(),
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1253.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1239.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-c3d7585f"
reconcilerVersion: "19.0.0-canary-3546d2bf"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {