diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index 2256061b5589c..49b4caceb1c7b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2cc0c2d7fd5b0cce9600b3f7552b625c>> + * @generated SignedSource<> */ "use strict"; @@ -12034,24 +12034,6 @@ if (__DEV__) { } } - function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - // Resolve default props. Taken from ReactElement - var props = assign({}, baseProps); - var defaultProps = Component.defaultProps; - - for (var propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - - return props; - } - - return baseProps; - } - var fakeInternalInstance = {}; var didWarnAboutStateAssignmentForComponent; var didWarnAboutUninitializedState; @@ -12845,7 +12827,12 @@ if (__DEV__) { renderLanes ) { var instance = workInProgress.stateNode; - var oldProps = workInProgress.memoizedProps; + var unresolvedOldProps = workInProgress.memoizedProps; + var oldProps = resolveClassComponentProps( + ctor, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context; var contextType = ctor.contextType; @@ -12868,7 +12855,13 @@ if (__DEV__) { var getDerivedStateFromProps = ctor.getDerivedStateFromProps; var hasNewLifecycles = typeof getDerivedStateFromProps === "function" || - typeof instance.getSnapshotBeforeUpdate === "function"; // Note: During these life-cycles, instance.props/instance.state are what + typeof instance.getSnapshotBeforeUpdate === "function"; // When comparing whether props changed, we should compare using the + // unresolved props object that is stored on the fiber, rather than the + // one that gets assigned to the instance, because that object may have been + // cloned to resolve default props and/or remove `ref`. + + var unresolvedNewProps = workInProgress.pendingProps; + var didReceiveNewProps = unresolvedNewProps !== unresolvedOldProps; // Note: During these life-cycles, instance.props/instance.state are what // ever the previously attempted to render - not the "current". However, // during componentDidUpdate we pass the "current" props. // In order to support react-lifecycles-compat polyfilled components, @@ -12879,7 +12872,7 @@ if (__DEV__) { (typeof instance.UNSAFE_componentWillReceiveProps === "function" || typeof instance.componentWillReceiveProps === "function") ) { - if (oldProps !== newProps || oldContext !== nextContext) { + if (didReceiveNewProps || oldContext !== nextContext) { callComponentWillReceiveProps( workInProgress, instance, @@ -12897,7 +12890,7 @@ if (__DEV__) { newState = workInProgress.memoizedState; if ( - oldProps === newProps && + !didReceiveNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() @@ -12994,10 +12987,11 @@ if (__DEV__) { var instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); var unresolvedOldProps = workInProgress.memoizedProps; - var oldProps = + var oldProps = resolveClassComponentProps( + ctor, + unresolvedOldProps, workInProgress.type === workInProgress.elementType - ? unresolvedOldProps - : resolveDefaultProps(workInProgress.type, unresolvedOldProps); + ); instance.props = oldProps; var unresolvedNewProps = workInProgress.pendingProps; var oldContext = instance.context; @@ -13166,6 +13160,53 @@ if (__DEV__) { return shouldUpdate; } + function resolveClassComponentProps( + Component, + baseProps, // Only resolve default props if this is a lazy component. Otherwise, they + // would have already been resolved by the JSX runtime. + // TODO: We're going to remove default prop resolution from the JSX runtime + // and keep it only for class components. As part of that change, we should + // remove this extra check. + alreadyResolvedDefaultProps + ) { + var newProps = baseProps; // Resolve default props. Taken from old JSX runtime, where this used to live. + + var defaultProps = Component.defaultProps; + + if (defaultProps && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + + for (var propName in defaultProps) { + if (newProps[propName] === undefined) { + newProps[propName] = defaultProps[propName]; + } + } + } + + return newProps; + } + + function resolveDefaultProps(Component, baseProps) { + // TODO: Remove support for default props for everything except class + // components, including setting default props on a lazy wrapper around a + // class type. + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = assign({}, baseProps); + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { // If the value is an error, call this function immediately after it is thrown @@ -14978,10 +15019,14 @@ if (__DEV__) { var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedProps = resolveDefaultProps(Component, props); if (typeof Component === "function") { if (isFunctionClassComponent(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + false + ); workInProgress.tag = ClassComponent; { @@ -14997,6 +15042,8 @@ if (__DEV__) { renderLanes ); } else { + var _resolvedProps = resolveDefaultProps(Component, props); + workInProgress.tag = FunctionComponent; { @@ -15009,7 +15056,7 @@ if (__DEV__) { null, workInProgress, Component, - resolvedProps, + _resolvedProps, renderLanes ); } @@ -15017,6 +15064,8 @@ if (__DEV__) { var $$typeof = Component.$$typeof; if ($$typeof === REACT_FORWARD_REF_TYPE) { + var _resolvedProps2 = resolveDefaultProps(Component, props); + workInProgress.tag = ForwardRef; { @@ -15028,16 +15077,18 @@ if (__DEV__) { null, workInProgress, Component, - resolvedProps, + _resolvedProps2, renderLanes ); } else if ($$typeof === REACT_MEMO_TYPE) { + var _resolvedProps3 = resolveDefaultProps(Component, props); + workInProgress.tag = MemoComponent; return updateMemoComponent( null, workInProgress, Component, - resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + resolveDefaultProps(Component.type, _resolvedProps3), // The inner type can have defaults too renderLanes ); } @@ -16943,16 +16994,17 @@ if (__DEV__) { var _Component = workInProgress.type; var _unresolvedProps = workInProgress.pendingProps; - var _resolvedProps = + var _resolvedProps4 = resolveClassComponentProps( + _Component, + _unresolvedProps, workInProgress.elementType === _Component - ? _unresolvedProps - : resolveDefaultProps(_Component, _unresolvedProps); + ); return updateClassComponent( current, workInProgress, _Component, - _resolvedProps, + _resolvedProps4, renderLanes ); } @@ -16984,7 +17036,7 @@ if (__DEV__) { var type = workInProgress.type; var _unresolvedProps2 = workInProgress.pendingProps; - var _resolvedProps2 = + var _resolvedProps5 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2); @@ -16993,7 +17045,7 @@ if (__DEV__) { current, workInProgress, type, - _resolvedProps2, + _resolvedProps5, renderLanes ); } @@ -17017,14 +17069,14 @@ if (__DEV__) { var _type = workInProgress.type; var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. - var _resolvedProps3 = resolveDefaultProps(_type, _unresolvedProps3); + var _resolvedProps6 = resolveDefaultProps(_type, _unresolvedProps3); - _resolvedProps3 = resolveDefaultProps(_type.type, _resolvedProps3); + _resolvedProps6 = resolveDefaultProps(_type.type, _resolvedProps6); return updateMemoComponent( current, workInProgress, _type, - _resolvedProps3, + _resolvedProps6, renderLanes ); } @@ -17043,16 +17095,17 @@ if (__DEV__) { var _Component2 = workInProgress.type; var _unresolvedProps4 = workInProgress.pendingProps; - var _resolvedProps4 = + var _resolvedProps7 = resolveClassComponentProps( + _Component2, + _unresolvedProps4, workInProgress.elementType === _Component2 - ? _unresolvedProps4 - : resolveDefaultProps(_Component2, _unresolvedProps4); + ); return mountIncompleteClassComponent( current, workInProgress, _Component2, - _resolvedProps4, + _resolvedProps7, renderLanes ); } @@ -17061,16 +17114,17 @@ if (__DEV__) { var _Component3 = workInProgress.type; var _unresolvedProps5 = workInProgress.pendingProps; - var _resolvedProps5 = + var _resolvedProps8 = resolveClassComponentProps( + _Component3, + _unresolvedProps5, workInProgress.elementType === _Component3 - ? _unresolvedProps5 - : resolveDefaultProps(_Component3, _unresolvedProps5); + ); return mountIncompleteFunctionComponent( current, workInProgress, _Component3, - _resolvedProps5, + _resolvedProps8, renderLanes ); } @@ -18970,7 +19024,11 @@ if (__DEV__) { } function callComponentWillUnmountWithTimer(current, instance) { - instance.props = current.memoizedProps; + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); instance.state = current.memoizedState; if (shouldProfile(current)) { @@ -19155,7 +19213,8 @@ if (__DEV__) { { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -19183,9 +19242,11 @@ if (__DEV__) { } var snapshot = instance.getSnapshotBeforeUpdate( - finishedWork.elementType === finishedWork.type - ? prevProps - : resolveDefaultProps(finishedWork.type, prevProps), + resolveClassComponentProps( + finishedWork.type, + prevProps, + finishedWork.elementType === finishedWork.type + ), prevState ); @@ -19489,7 +19550,8 @@ if (__DEV__) { // TODO: revisit this when we implement resuming. { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -19533,17 +19595,19 @@ if (__DEV__) { } } } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); var prevState = current.memoizedState; // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -19607,7 +19671,8 @@ if (__DEV__) { { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -26737,7 +26802,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-canary-26794664"; + var ReactVersion = "19.0.0-canary-327941b3"; // Might add PROFILE later. diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index a8711c3470b59..bcd1d9c39ce00 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<6f283bb7daebfe3367fda67f5a8a1243>> */ "use strict"; @@ -3364,17 +3364,6 @@ HooksDispatcherOnRerender.useOptimistic = function (passthrough, reducer) { hook.baseState = passthrough; return [passthrough, hook.queue.dispatch]; }; -function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; -} function applyDerivedStateFromProps( workInProgress, ctor, @@ -3524,6 +3513,31 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } +function resolveClassComponentProps( + Component, + baseProps, + alreadyResolvedDefaultProps +) { + var newProps = baseProps; + if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + for (var propName in Component) + void 0 === newProps[propName] && + (newProps[propName] = Component[propName]); + } + return newProps; +} +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + baseProps = assign({}, baseProps); + Component = Component.defaultProps; + for (var propName in Component) + void 0 === baseProps[propName] && + (baseProps[propName] = Component[propName]); + return baseProps; + } + return baseProps; +} var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { @@ -4086,7 +4100,12 @@ function updateClassComponent( (nextProps = !0); else if (null === current) { var instance = workInProgress.stateNode, - oldProps = workInProgress.memoizedProps; + unresolvedOldProps = workInProgress.memoizedProps, + oldProps = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context, contextType = Component.contextType; @@ -4100,10 +4119,11 @@ function updateClassComponent( hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; hasNewLifecycles || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== nextProps || oldContext !== contextType) && + ((unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( workInProgress, instance, @@ -4116,7 +4136,7 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; - oldProps !== nextProps || + unresolvedOldProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate @@ -4163,13 +4183,14 @@ function updateClassComponent( instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); oldProps = workInProgress.memoizedProps; - contextType = + contextType = resolveClassComponentProps( + Component, + oldProps, workInProgress.type === workInProgress.elementType - ? oldProps - : resolveDefaultProps(workInProgress.type, oldProps); + ); instance.props = contextType; hasNewLifecycles = workInProgress.pendingProps; - oldState = instance.context; + unresolvedOldProps = instance.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -4177,13 +4198,13 @@ function updateClassComponent( ? previousContext : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); - var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; + oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = - "function" === typeof getDerivedStateFromProps$jscomp$0 || + "function" === typeof oldState || "function" === typeof instance.getSnapshotBeforeUpdate) || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || oldState !== oldContext) && + ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, instance, @@ -4191,20 +4212,20 @@ function updateClassComponent( oldContext )); hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - instance.state = oldState; + unresolvedOldProps = workInProgress.memoizedState; + instance.state = unresolvedOldProps; processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || + unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && + ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, Component, - getDerivedStateFromProps$jscomp$0, + oldState, nextProps ), (newState = workInProgress.memoizedState)), @@ -4215,7 +4236,7 @@ function updateClassComponent( Component, contextType, nextProps, - oldState, + unresolvedOldProps, newState, oldContext ) || @@ -4237,11 +4258,11 @@ function updateClassComponent( (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), @@ -4251,11 +4272,11 @@ function updateClassComponent( (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } @@ -4933,57 +4954,61 @@ function beginWork(current, workInProgress, renderLanes) { var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var init = elementType._init; - elementType = init(elementType._payload); - workInProgress.type = elementType; - current = resolveDefaultProps(elementType, current); - if ("function" === typeof elementType) - shouldConstruct(elementType) - ? ((workInProgress.tag = 1), + var props = workInProgress.pendingProps; + current = elementType._init; + current = current(elementType._payload); + workInProgress.type = current; + if ("function" === typeof current) + shouldConstruct(current) + ? ((props = resolveClassComponentProps(current, props, !1)), + (workInProgress.tag = 1), (workInProgress = updateClassComponent( null, workInProgress, - elementType, current, + props, renderLanes ))) - : ((workInProgress.tag = 0), + : ((props = resolveDefaultProps(current, props)), + (workInProgress.tag = 0), (workInProgress = updateFunctionComponent( null, workInProgress, - elementType, current, + props, renderLanes ))); else { - if (void 0 !== elementType && null !== elementType) + if (void 0 !== current && null !== current) if ( - ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ((elementType = current.$$typeof), + elementType === REACT_FORWARD_REF_TYPE) ) { + props = resolveDefaultProps(current, props); workInProgress.tag = 11; workInProgress = updateForwardRef( null, workInProgress, - elementType, current, + props, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { + } else if (elementType === REACT_MEMO_TYPE) { + props = resolveDefaultProps(current, props); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, - elementType, - resolveDefaultProps(elementType.type, current), + current, + resolveDefaultProps(current.type, props), renderLanes ); break a; } throw Error( "Element type is invalid. Received a promise that resolves to: " + - elementType + + current + ". Lazy element type must resolve to a class or function." ); } @@ -4991,33 +5016,33 @@ function beginWork(current, workInProgress, renderLanes) { return workInProgress; case 0: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateFunctionComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); case 1: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), updateClassComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5026,24 +5051,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; - init = workInProgress.memoizedState; - elementType = init.element; + elementType = workInProgress.memoizedState; + props = elementType.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== init.cache && + nextCache !== elementType.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - init = nextProps.element; - init === elementType + elementType = nextProps.element; + elementType === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, init, renderLanes), + : (reconcileChildren(current, workInProgress, elementType, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: @@ -5051,9 +5076,9 @@ function beginWork(current, workInProgress, renderLanes) { case 5: return ( pushHostContext(workInProgress), - (elementType = workInProgress.pendingProps.children), + (props = workInProgress.pendingProps.children), null !== workInProgress.memoizedState && - ((init = renderWithHooks( + ((elementType = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5061,17 +5086,17 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = init), + (HostTransitionContext._currentValue2 = elementType), didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== init && + current.memoizedState.memoizedState !== elementType && propagateContextChange( workInProgress, HostTransitionContext, renderLanes )), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 6: @@ -5084,35 +5109,30 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (elementType = workInProgress.pendingProps), + (props = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - elementType, + props, renderLanes )) - : reconcileChildren( - current, - workInProgress, - elementType, - renderLanes - ), + : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 11: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateForwardRef( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5148,15 +5168,15 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - elementType = workInProgress.type._context; - init = workInProgress.pendingProps; + props = workInProgress.type._context; + elementType = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); + nextCache = elementType.value; + pushProvider(workInProgress, props, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === init.children && + nextProps.children === elementType.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5166,33 +5186,37 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); + } else propagateContextChange(workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (init = workInProgress.type), - (elementType = workInProgress.pendingProps.children), + (elementType = workInProgress.type), + (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (init = readContext(init)), - (elementType = elementType(init)), + (elementType = readContext(elementType)), + (props = props(elementType)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 14: return ( - (elementType = workInProgress.type), - (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), - (init = resolveDefaultProps(elementType.type, init)), + (props = workInProgress.type), + (elementType = resolveDefaultProps(props, workInProgress.pendingProps)), + (elementType = resolveDefaultProps(props.type, elementType)), updateMemoComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5206,24 +5230,24 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(elementType) + isContextProvider(props) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, elementType, init), - mountClassInstance(workInProgress, elementType, init, renderLanes), + constructClassInstance(workInProgress, props, elementType), + mountClassInstance(workInProgress, props, elementType, renderLanes), finishClassComponent( null, workInProgress, - elementType, + props, !0, current, renderLanes @@ -5231,19 +5255,19 @@ function beginWork(current, workInProgress, renderLanes) { ); case 28: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 0), updateFunctionComponent( null, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5254,39 +5278,40 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(CacheContext)), + (props = readContext(CacheContext)), null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), + ? ((elementType = peekCacheFromPool()), + null === elementType && + ((elementType = workInProgressRoot), (nextProps = createCache()), - (init.pooledCache = nextProps), + (elementType.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), + null !== nextProps && + (elementType.pooledCacheLanes |= renderLanes), + (elementType = nextProps)), (workInProgress.memoizedState = { - parent: elementType, - cache: init + parent: props, + cache: elementType }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) + pushProvider(workInProgress, CacheContext, elementType)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), + (elementType = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== elementType - ? ((init = { parent: elementType, cache: elementType }), - (workInProgress.memoizedState = init), + elementType.parent !== props + ? ((elementType = { parent: props, cache: props }), + (workInProgress.memoizedState = elementType), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, elementType)) - : ((elementType = nextProps.cache), - pushProvider(workInProgress, CacheContext, elementType), - elementType !== init.cache && + elementType), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== elementType.cache && propagateContextChange( workInProgress, CacheContext, @@ -5535,14 +5560,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$67 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$67 = lastTailNode), + for (var lastTailNode$70 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$70 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$67 + null === lastTailNode$70 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$67.sibling = null); + : (lastTailNode$70.sibling = null); } } function bubbleProperties(completedWork) { @@ -5552,19 +5577,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$68 = completedWork.child; null !== child$68; ) - (newChildLanes |= child$68.lanes | child$68.childLanes), - (subtreeFlags |= child$68.subtreeFlags & 31457280), - (subtreeFlags |= child$68.flags & 31457280), - (child$68.return = completedWork), - (child$68 = child$68.sibling); + for (var child$71 = completedWork.child; null !== child$71; ) + (newChildLanes |= child$71.lanes | child$71.childLanes), + (subtreeFlags |= child$71.subtreeFlags & 31457280), + (subtreeFlags |= child$71.flags & 31457280), + (child$71.return = completedWork), + (child$71 = child$71.sibling); else - for (child$68 = completedWork.child; null !== child$68; ) - (newChildLanes |= child$68.lanes | child$68.childLanes), - (subtreeFlags |= child$68.subtreeFlags), - (subtreeFlags |= child$68.flags), - (child$68.return = completedWork), - (child$68 = child$68.sibling); + for (child$71 = completedWork.child; null !== child$71; ) + (newChildLanes |= child$71.lanes | child$71.childLanes), + (subtreeFlags |= child$71.subtreeFlags), + (subtreeFlags |= child$71.flags), + (child$71.return = completedWork), + (child$71 = child$71.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5727,11 +5752,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$72 = null; + var cache$75 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$72 = newProps.memoizedState.cachePool.pool); - cache$72 !== index && (newProps.flags |= 2048); + (cache$75 = newProps.memoizedState.cachePool.pool); + cache$75 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -5758,8 +5783,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$72 = index.rendering; - if (null === cache$72) + cache$75 = index.rendering; + if (null === cache$75) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -5767,11 +5792,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$72 = findFirstSuspended(current); - if (null !== cache$72) { + cache$75 = findFirstSuspended(current); + if (null !== cache$75) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$72.updateQueue; + current = cache$75.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -5796,7 +5821,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$72)), null !== current)) { + if (((current = findFirstSuspended(cache$75)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5806,7 +5831,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$72.alternate) + !cache$75.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -5818,13 +5843,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$72.sibling = workInProgress.child), - (workInProgress.child = cache$72)) + ? ((cache$75.sibling = workInProgress.child), + (workInProgress.child = cache$75)) : ((current = index.last), null !== current - ? (current.sibling = cache$72) - : (workInProgress.child = cache$72), - (index.last = cache$72)); + ? (current.sibling = cache$75) + : (workInProgress.child = cache$75), + (index.last = cache$75)); } if (null !== index.tail) return ( @@ -5998,6 +6023,15 @@ var offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null; +function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + instance.componentWillUnmount(); +} function safelyAttachRef(current, nearestMountedAncestor) { try { var ref = current.ref; @@ -6037,8 +6071,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$88) { - captureCommitPhaseError(current, nearestMountedAncestor, error$88); + } catch (error$91) { + captureCommitPhaseError(current, nearestMountedAncestor, error$91); } else ref.current = null; } @@ -6072,13 +6106,14 @@ function commitBeforeMutationEffects(root, firstChild) { break; case 1: if (0 !== (flags & 1024) && null !== current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState, + var prevState = current.memoizedState, instance = root.stateNode, snapshot = instance.getSnapshotBeforeUpdate( - root.elementType === root.type - ? prevProps - : resolveDefaultProps(root.type, prevProps), + resolveClassComponentProps( + root.type, + current.memoizedProps, + root.elementType === root.type + ), prevState ); instance.__reactInternalSnapshotBeforeUpdate = snapshot; @@ -6144,10 +6179,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$89 = effect.create, + var create$92 = effect.create, inst = effect.inst; - create$89 = create$89(); - inst.destroy = create$89; + create$92 = create$92(); + inst.destroy = create$92; } effect = effect.next; } while (effect !== finishedWork); @@ -6190,10 +6225,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); current = current.memoizedState; try { finishedRoot.componentDidUpdate( @@ -6201,11 +6237,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$90) { + } catch (error$93) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$90 + error$93 ); } } @@ -6444,9 +6480,7 @@ function commitDeletionEffectsOnFiber( "function" === typeof prevHostParent.componentWillUnmount) ) try { - (prevHostParent.props = deletedFiber.memoizedProps), - (prevHostParent.state = deletedFiber.memoizedState), - prevHostParent.componentWillUnmount(); + callComponentWillUnmountWithTimer(deletedFiber, prevHostParent); } catch (error) { captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error); } @@ -6582,8 +6616,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$98) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$98); + } catch (error$101) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$101); } } break; @@ -6621,8 +6655,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { (flags.type = type), (flags.props = existingHiddenCallbacks); - } catch (error$101) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$101); + } catch (error$104) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$104); } } break; @@ -6638,8 +6672,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { existingHiddenCallbacks = finishedWork.memoizedProps; try { flags.text = existingHiddenCallbacks; - } catch (error$102) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$102); + } catch (error$105) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$105); } } break; @@ -6725,11 +6759,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { wasHidden.stateNode.isHidden = existingHiddenCallbacks ? !0 : !1; - } catch (error$92) { + } catch (error$95) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$92 + error$95 ); } } else if ( @@ -6807,12 +6841,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$93 = JSCompiler_inline_result.stateNode.containerInfo, - before$94 = getHostSibling(finishedWork); + var parent$96 = JSCompiler_inline_result.stateNode.containerInfo, + before$97 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$94, - parent$93 + before$97, + parent$96 ); break; default: @@ -6851,10 +6885,7 @@ function recursivelyTraverseDisappearLayoutEffects(parentFiber) { var current = finishedWork, nearestMountedAncestor = finishedWork.return; try { - var current$jscomp$0 = current; - instance.props = current$jscomp$0.memoizedProps; - instance.state = current$jscomp$0.memoizedState; - instance.componentWillUnmount(); + callComponentWillUnmountWithTimer(current, instance); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } @@ -7944,8 +7975,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$110) { - handleThrow(root, thrownValue$110); + } catch (thrownValue$113) { + handleThrow(root, thrownValue$113); } while (1); lanes && root.shellSuspendCounter++; @@ -8053,8 +8084,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$112) { - handleThrow(root, thrownValue$112); + } catch (thrownValue$115) { + handleThrow(root, thrownValue$115); } while (1); resetContextDependencies(); @@ -9186,19 +9217,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_990 = { +var devToolsConfig$jscomp$inline_999 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-e5758235", + version: "19.0.0-canary-13b2df5c", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1175 = { - bundleType: devToolsConfig$jscomp$inline_990.bundleType, - version: devToolsConfig$jscomp$inline_990.version, - rendererPackageName: devToolsConfig$jscomp$inline_990.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_990.rendererConfig, +var internals$jscomp$inline_1183 = { + bundleType: devToolsConfig$jscomp$inline_999.bundleType, + version: devToolsConfig$jscomp$inline_999.version, + rendererPackageName: devToolsConfig$jscomp$inline_999.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_999.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9215,26 +9246,26 @@ var internals$jscomp$inline_1175 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_990.findFiberByHostInstance || + devToolsConfig$jscomp$inline_999.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-e5758235" + reconcilerVersion: "19.0.0-canary-13b2df5c" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1176 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1184 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1176.isDisabled && - hook$jscomp$inline_1176.supportsFiber + !hook$jscomp$inline_1184.isDisabled && + hook$jscomp$inline_1184.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1176.inject( - internals$jscomp$inline_1175 + (rendererID = hook$jscomp$inline_1184.inject( + internals$jscomp$inline_1183 )), - (injectedHook = hook$jscomp$inline_1176); + (injectedHook = hook$jscomp$inline_1184); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 9bfe54b217a4b..79c4321070100 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<2a3186fe9e6cfda36a0aaff3ef6adc8a>> */ "use strict"; @@ -3517,17 +3517,6 @@ function transferActualDuration(fiber) { for (var child = fiber.child; child; ) (fiber.actualDuration += child.actualDuration), (child = child.sibling); } -function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; -} function applyDerivedStateFromProps( workInProgress, ctor, @@ -3682,6 +3671,31 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } +function resolveClassComponentProps( + Component, + baseProps, + alreadyResolvedDefaultProps +) { + var newProps = baseProps; + if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + for (var propName in Component) + void 0 === newProps[propName] && + (newProps[propName] = Component[propName]); + } + return newProps; +} +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + baseProps = assign({}, baseProps); + Component = Component.defaultProps; + for (var propName in Component) + void 0 === baseProps[propName] && + (baseProps[propName] = Component[propName]); + return baseProps; + } + return baseProps; +} var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { @@ -4250,7 +4264,12 @@ function updateClassComponent( (nextProps = !0); else if (null === current) { var instance = workInProgress.stateNode, - oldProps = workInProgress.memoizedProps; + unresolvedOldProps = workInProgress.memoizedProps, + oldProps = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context, contextType = Component.contextType; @@ -4264,10 +4283,11 @@ function updateClassComponent( hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; hasNewLifecycles || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== nextProps || oldContext !== contextType) && + ((unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( workInProgress, instance, @@ -4280,7 +4300,7 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; - oldProps !== nextProps || + unresolvedOldProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate @@ -4327,13 +4347,14 @@ function updateClassComponent( instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); oldProps = workInProgress.memoizedProps; - contextType = + contextType = resolveClassComponentProps( + Component, + oldProps, workInProgress.type === workInProgress.elementType - ? oldProps - : resolveDefaultProps(workInProgress.type, oldProps); + ); instance.props = contextType; hasNewLifecycles = workInProgress.pendingProps; - oldState = instance.context; + unresolvedOldProps = instance.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -4341,13 +4362,13 @@ function updateClassComponent( ? previousContext : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); - var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; + oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = - "function" === typeof getDerivedStateFromProps$jscomp$0 || + "function" === typeof oldState || "function" === typeof instance.getSnapshotBeforeUpdate) || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || oldState !== oldContext) && + ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, instance, @@ -4355,20 +4376,20 @@ function updateClassComponent( oldContext )); hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - instance.state = oldState; + unresolvedOldProps = workInProgress.memoizedState; + instance.state = unresolvedOldProps; processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || + unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && + ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, Component, - getDerivedStateFromProps$jscomp$0, + oldState, nextProps ), (newState = workInProgress.memoizedState)), @@ -4379,7 +4400,7 @@ function updateClassComponent( Component, contextType, nextProps, - oldState, + unresolvedOldProps, newState, oldContext ) || @@ -4401,11 +4422,11 @@ function updateClassComponent( (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), @@ -4415,11 +4436,11 @@ function updateClassComponent( (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } @@ -5122,57 +5143,61 @@ function beginWork(current, workInProgress, renderLanes) { var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var init = elementType._init; - elementType = init(elementType._payload); - workInProgress.type = elementType; - current = resolveDefaultProps(elementType, current); - if ("function" === typeof elementType) - shouldConstruct(elementType) - ? ((workInProgress.tag = 1), + var props = workInProgress.pendingProps; + current = elementType._init; + current = current(elementType._payload); + workInProgress.type = current; + if ("function" === typeof current) + shouldConstruct(current) + ? ((props = resolveClassComponentProps(current, props, !1)), + (workInProgress.tag = 1), (workInProgress = updateClassComponent( null, workInProgress, - elementType, current, + props, renderLanes ))) - : ((workInProgress.tag = 0), + : ((props = resolveDefaultProps(current, props)), + (workInProgress.tag = 0), (workInProgress = updateFunctionComponent( null, workInProgress, - elementType, current, + props, renderLanes ))); else { - if (void 0 !== elementType && null !== elementType) + if (void 0 !== current && null !== current) if ( - ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ((elementType = current.$$typeof), + elementType === REACT_FORWARD_REF_TYPE) ) { + props = resolveDefaultProps(current, props); workInProgress.tag = 11; workInProgress = updateForwardRef( null, workInProgress, - elementType, current, + props, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { + } else if (elementType === REACT_MEMO_TYPE) { + props = resolveDefaultProps(current, props); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, - elementType, - resolveDefaultProps(elementType.type, current), + current, + resolveDefaultProps(current.type, props), renderLanes ); break a; } throw Error( "Element type is invalid. Received a promise that resolves to: " + - elementType + + current + ". Lazy element type must resolve to a class or function." ); } @@ -5180,33 +5205,33 @@ function beginWork(current, workInProgress, renderLanes) { return workInProgress; case 0: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateFunctionComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); case 1: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), updateClassComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5215,24 +5240,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; - init = workInProgress.memoizedState; - elementType = init.element; + elementType = workInProgress.memoizedState; + props = elementType.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== init.cache && + nextCache !== elementType.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - init = nextProps.element; - init === elementType + elementType = nextProps.element; + elementType === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, init, renderLanes), + : (reconcileChildren(current, workInProgress, elementType, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: @@ -5240,9 +5265,9 @@ function beginWork(current, workInProgress, renderLanes) { case 5: return ( pushHostContext(workInProgress), - (elementType = workInProgress.pendingProps.children), + (props = workInProgress.pendingProps.children), null !== workInProgress.memoizedState && - ((init = renderWithHooks( + ((elementType = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -5250,17 +5275,17 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes )), - (HostTransitionContext._currentValue2 = init), + (HostTransitionContext._currentValue2 = elementType), didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== init && + current.memoizedState.memoizedState !== elementType && propagateContextChange( workInProgress, HostTransitionContext, renderLanes )), markRef(current, workInProgress), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 6: @@ -5273,35 +5298,30 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (elementType = workInProgress.pendingProps), + (props = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - elementType, + props, renderLanes )) - : reconcileChildren( - current, - workInProgress, - elementType, - renderLanes - ), + : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 11: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateForwardRef( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5328,9 +5348,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (elementType = workInProgress.stateNode), - (elementType.effectDuration = 0), - (elementType.passiveEffectDuration = 0), + (props = workInProgress.stateNode), + (props.effectDuration = 0), + (props.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -5341,15 +5361,15 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - elementType = workInProgress.type._context; - init = workInProgress.pendingProps; + props = workInProgress.type._context; + elementType = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); + nextCache = elementType.value; + pushProvider(workInProgress, props, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === init.children && + nextProps.children === elementType.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -5359,35 +5379,39 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); + } else propagateContextChange(workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (init = workInProgress.type), - (elementType = workInProgress.pendingProps.children), + (elementType = workInProgress.type), + (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (init = readContext(init)), + (elementType = readContext(elementType)), markComponentRenderStarted(workInProgress), - (elementType = elementType(init)), + (props = props(elementType)), markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 14: return ( - (elementType = workInProgress.type), - (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), - (init = resolveDefaultProps(elementType.type, init)), + (props = workInProgress.type), + (elementType = resolveDefaultProps(props, workInProgress.pendingProps)), + (elementType = resolveDefaultProps(props.type, elementType)), updateMemoComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5401,24 +5425,24 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(elementType) + isContextProvider(props) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, elementType, init), - mountClassInstance(workInProgress, elementType, init, renderLanes), + constructClassInstance(workInProgress, props, elementType), + mountClassInstance(workInProgress, props, elementType, renderLanes), finishClassComponent( null, workInProgress, - elementType, + props, !0, current, renderLanes @@ -5426,19 +5450,19 @@ function beginWork(current, workInProgress, renderLanes) { ); case 28: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 0), updateFunctionComponent( null, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -5449,39 +5473,40 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(CacheContext)), + (props = readContext(CacheContext)), null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), + ? ((elementType = peekCacheFromPool()), + null === elementType && + ((elementType = workInProgressRoot), (nextProps = createCache()), - (init.pooledCache = nextProps), + (elementType.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), + null !== nextProps && + (elementType.pooledCacheLanes |= renderLanes), + (elementType = nextProps)), (workInProgress.memoizedState = { - parent: elementType, - cache: init + parent: props, + cache: elementType }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) + pushProvider(workInProgress, CacheContext, elementType)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), + (elementType = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== elementType - ? ((init = { parent: elementType, cache: elementType }), - (workInProgress.memoizedState = init), + elementType.parent !== props + ? ((elementType = { parent: props, cache: props }), + (workInProgress.memoizedState = elementType), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, elementType)) - : ((elementType = nextProps.cache), - pushProvider(workInProgress, CacheContext, elementType), - elementType !== init.cache && + elementType), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== elementType.cache && propagateContextChange( workInProgress, CacheContext, @@ -5730,14 +5755,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$69 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$69 = lastTailNode), + for (var lastTailNode$72 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$72 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$69 + null === lastTailNode$72 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$69.sibling = null); + : (lastTailNode$72.sibling = null); } } function bubbleProperties(completedWork) { @@ -5749,53 +5774,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$71 = completedWork.selfBaseDuration, - child$72 = completedWork.child; - null !== child$72; + var treeBaseDuration$74 = completedWork.selfBaseDuration, + child$75 = completedWork.child; + null !== child$75; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags & 31457280), - (subtreeFlags |= child$72.flags & 31457280), - (treeBaseDuration$71 += child$72.treeBaseDuration), - (child$72 = child$72.sibling); - completedWork.treeBaseDuration = treeBaseDuration$71; + (newChildLanes |= child$75.lanes | child$75.childLanes), + (subtreeFlags |= child$75.subtreeFlags & 31457280), + (subtreeFlags |= child$75.flags & 31457280), + (treeBaseDuration$74 += child$75.treeBaseDuration), + (child$75 = child$75.sibling); + completedWork.treeBaseDuration = treeBaseDuration$74; } else for ( - treeBaseDuration$71 = completedWork.child; - null !== treeBaseDuration$71; + treeBaseDuration$74 = completedWork.child; + null !== treeBaseDuration$74; ) (newChildLanes |= - treeBaseDuration$71.lanes | treeBaseDuration$71.childLanes), - (subtreeFlags |= treeBaseDuration$71.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$71.flags & 31457280), - (treeBaseDuration$71.return = completedWork), - (treeBaseDuration$71 = treeBaseDuration$71.sibling); + treeBaseDuration$74.lanes | treeBaseDuration$74.childLanes), + (subtreeFlags |= treeBaseDuration$74.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$74.flags & 31457280), + (treeBaseDuration$74.return = completedWork), + (treeBaseDuration$74 = treeBaseDuration$74.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$71 = completedWork.actualDuration; - child$72 = completedWork.selfBaseDuration; + treeBaseDuration$74 = completedWork.actualDuration; + child$75 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$71 += child.actualDuration), - (child$72 += child.treeBaseDuration), + (treeBaseDuration$74 += child.actualDuration), + (child$75 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$71; - completedWork.treeBaseDuration = child$72; + completedWork.actualDuration = treeBaseDuration$74; + completedWork.treeBaseDuration = child$75; } else for ( - treeBaseDuration$71 = completedWork.child; - null !== treeBaseDuration$71; + treeBaseDuration$74 = completedWork.child; + null !== treeBaseDuration$74; ) (newChildLanes |= - treeBaseDuration$71.lanes | treeBaseDuration$71.childLanes), - (subtreeFlags |= treeBaseDuration$71.subtreeFlags), - (subtreeFlags |= treeBaseDuration$71.flags), - (treeBaseDuration$71.return = completedWork), - (treeBaseDuration$71 = treeBaseDuration$71.sibling); + treeBaseDuration$74.lanes | treeBaseDuration$74.childLanes), + (subtreeFlags |= treeBaseDuration$74.subtreeFlags), + (subtreeFlags |= treeBaseDuration$74.flags), + (treeBaseDuration$74.return = completedWork), + (treeBaseDuration$74 = treeBaseDuration$74.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5968,11 +5993,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$79 = null; + var cache$82 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$79 = newProps.memoizedState.cachePool.pool); - cache$79 !== index && (newProps.flags |= 2048); + (cache$82 = newProps.memoizedState.cachePool.pool); + cache$82 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6004,8 +6029,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$79 = index.rendering; - if (null === cache$79) + cache$82 = index.rendering; + if (null === cache$82) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6013,11 +6038,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$79 = findFirstSuspended(current); - if (null !== cache$79) { + cache$82 = findFirstSuspended(current); + if (null !== cache$82) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$79.updateQueue; + current = cache$82.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6042,7 +6067,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$79)), null !== current)) { + if (((current = findFirstSuspended(cache$82)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6052,7 +6077,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$79.alternate) + !cache$82.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6064,13 +6089,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$79.sibling = workInProgress.child), - (workInProgress.child = cache$79)) + ? ((cache$82.sibling = workInProgress.child), + (workInProgress.child = cache$82)) : ((current = index.last), null !== current - ? (current.sibling = cache$79) - : (workInProgress.child = cache$79), - (index.last = cache$79)); + ? (current.sibling = cache$82) + : (workInProgress.child = cache$82), + (index.last = cache$82)); } if (null !== index.tail) return ( @@ -6257,7 +6282,11 @@ function shouldProfile(current) { return 0 !== (current.mode & 2) && 0 !== (executionContext & 4); } function callComponentWillUnmountWithTimer(current, instance) { - instance.props = current.memoizedProps; + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); instance.state = current.memoizedState; if (shouldProfile(current)) try { @@ -6324,8 +6353,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$95) { - captureCommitPhaseError(current, nearestMountedAncestor, error$95); + } catch (error$98) { + captureCommitPhaseError(current, nearestMountedAncestor, error$98); } else ref.current = null; } @@ -6359,13 +6388,14 @@ function commitBeforeMutationEffects(root, firstChild) { break; case 1: if (0 !== (flags & 1024) && null !== current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState, + var prevState = current.memoizedState, instance = root.stateNode, snapshot = instance.getSnapshotBeforeUpdate( - root.elementType === root.type - ? prevProps - : resolveDefaultProps(root.type, prevProps), + resolveClassComponentProps( + root.type, + current.memoizedProps, + root.elementType === root.type + ), prevState ); instance.__reactInternalSnapshotBeforeUpdate = snapshot; @@ -6460,10 +6490,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$96 = effect.create, + var create$99 = effect.create, inst = effect.inst; - create$96 = create$96(); - inst.destroy = create$96; + create$99 = create$99(); + inst.destroy = create$99; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -6491,8 +6521,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$98) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$98); + } catch (error$101) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$101); } } function commitClassCallbacks(finishedWork) { @@ -6572,18 +6602,19 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$99) { + } catch (error$102) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$99 + error$102 ); } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); current = current.memoizedState; if (shouldProfile(finishedWork)) { try { @@ -6593,11 +6624,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$103) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$103 ); } recordLayoutEffectDuration(finishedWork); @@ -6608,11 +6639,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$101) { + } catch (error$104) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$101 + error$104 ); } } @@ -7001,22 +7032,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$110) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$110 + error$113 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$111) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$114 ); } } @@ -7055,8 +7086,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { finishedWork.updateQueue = null; try { (flags.type = type), (flags.props = existingHiddenCallbacks); - } catch (error$114) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$114); + } catch (error$117) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$117); } } break; @@ -7072,8 +7103,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { existingHiddenCallbacks = finishedWork.memoizedProps; try { flags.text = existingHiddenCallbacks; - } catch (error$115) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$115); + } catch (error$118) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$118); } } break; @@ -7159,11 +7190,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { wasHidden.stateNode.isHidden = existingHiddenCallbacks ? !0 : !1; - } catch (error$104) { + } catch (error$107) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$104 + error$107 ); } } else if ( @@ -7241,12 +7272,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$105 = JSCompiler_inline_result.stateNode.containerInfo, - before$106 = getHostSibling(finishedWork); + var parent$108 = JSCompiler_inline_result.stateNode.containerInfo, + before$109 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$106, - parent$105 + before$109, + parent$108 ); break; default: @@ -7426,8 +7457,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$119) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$119); + } catch (error$122) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$122); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -8448,8 +8479,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$124) { - handleThrow(root, thrownValue$124); + } catch (thrownValue$127) { + handleThrow(root, thrownValue$127); } while (1); lanes && root.shellSuspendCounter++; @@ -8559,8 +8590,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$126) { - handleThrow(root, thrownValue$126); + } catch (thrownValue$129) { + handleThrow(root, thrownValue$129); } while (1); resetContextDependencies(); @@ -8924,11 +8955,16 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$97 = commitTime, + commitTime$100 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && - onPostCommit(id, phase, passiveEffectDuration, commitTime$97); + onPostCommit( + id, + phase, + passiveEffectDuration, + commitTime$100 + ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { switch (parentFiber.tag) { @@ -9802,12 +9838,12 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1074 = { +var devToolsConfig$jscomp$inline_1083 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-1b065d5e", + version: "19.0.0-canary-14928a45", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9824,10 +9860,10 @@ var devToolsConfig$jscomp$inline_1074 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1074.bundleType, - version: devToolsConfig$jscomp$inline_1074.version, - rendererPackageName: devToolsConfig$jscomp$inline_1074.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1074.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1083.bundleType, + version: devToolsConfig$jscomp$inline_1083.version, + rendererPackageName: devToolsConfig$jscomp$inline_1083.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1083.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9844,14 +9880,14 @@ var devToolsConfig$jscomp$inline_1074 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1074.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1083.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-1b065d5e" + reconcilerVersion: "19.0.0-canary-14928a45" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 70502d87da701..2be9990a264d8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -5de8703646cdd3838cb1686f761b10c0692743aa +dc545c8d6eaca87c8d5cabfab6e1c768ecafe426 diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index a2efd27d5c3c1..acf60b9889042 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -15640,24 +15640,6 @@ to return true:wantsResponderID| | } } - function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - // Resolve default props. Taken from ReactElement - var props = assign({}, baseProps); - var defaultProps = Component.defaultProps; - - for (var propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - - return props; - } - - return baseProps; - } - var fakeInternalInstance = {}; var didWarnAboutStateAssignmentForComponent; var didWarnAboutUninitializedState; @@ -16489,7 +16471,12 @@ to return true:wantsResponderID| | renderLanes ) { var instance = workInProgress.stateNode; - var oldProps = workInProgress.memoizedProps; + var unresolvedOldProps = workInProgress.memoizedProps; + var oldProps = resolveClassComponentProps( + ctor, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context; var contextType = ctor.contextType; @@ -16512,7 +16499,13 @@ to return true:wantsResponderID| | var getDerivedStateFromProps = ctor.getDerivedStateFromProps; var hasNewLifecycles = typeof getDerivedStateFromProps === "function" || - typeof instance.getSnapshotBeforeUpdate === "function"; // Note: During these life-cycles, instance.props/instance.state are what + typeof instance.getSnapshotBeforeUpdate === "function"; // When comparing whether props changed, we should compare using the + // unresolved props object that is stored on the fiber, rather than the + // one that gets assigned to the instance, because that object may have been + // cloned to resolve default props and/or remove `ref`. + + var unresolvedNewProps = workInProgress.pendingProps; + var didReceiveNewProps = unresolvedNewProps !== unresolvedOldProps; // Note: During these life-cycles, instance.props/instance.state are what // ever the previously attempted to render - not the "current". However, // during componentDidUpdate we pass the "current" props. // In order to support react-lifecycles-compat polyfilled components, @@ -16523,7 +16516,7 @@ to return true:wantsResponderID| | (typeof instance.UNSAFE_componentWillReceiveProps === "function" || typeof instance.componentWillReceiveProps === "function") ) { - if (oldProps !== newProps || oldContext !== nextContext) { + if (didReceiveNewProps || oldContext !== nextContext) { callComponentWillReceiveProps( workInProgress, instance, @@ -16541,7 +16534,7 @@ to return true:wantsResponderID| | newState = workInProgress.memoizedState; if ( - oldProps === newProps && + !didReceiveNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() @@ -16638,10 +16631,11 @@ to return true:wantsResponderID| | var instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); var unresolvedOldProps = workInProgress.memoizedProps; - var oldProps = + var oldProps = resolveClassComponentProps( + ctor, + unresolvedOldProps, workInProgress.type === workInProgress.elementType - ? unresolvedOldProps - : resolveDefaultProps(workInProgress.type, unresolvedOldProps); + ); instance.props = oldProps; var unresolvedNewProps = workInProgress.pendingProps; var oldContext = instance.context; @@ -16810,6 +16804,53 @@ to return true:wantsResponderID| | return shouldUpdate; } + function resolveClassComponentProps( + Component, + baseProps, // Only resolve default props if this is a lazy component. Otherwise, they + // would have already been resolved by the JSX runtime. + // TODO: We're going to remove default prop resolution from the JSX runtime + // and keep it only for class components. As part of that change, we should + // remove this extra check. + alreadyResolvedDefaultProps + ) { + var newProps = baseProps; // Resolve default props. Taken from old JSX runtime, where this used to live. + + var defaultProps = Component.defaultProps; + + if (defaultProps && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + + for (var propName in defaultProps) { + if (newProps[propName] === undefined) { + newProps[propName] = defaultProps[propName]; + } + } + } + + return newProps; + } + + function resolveDefaultProps(Component, baseProps) { + // TODO: Remove support for default props for everything except class + // components, including setting default props on a lazy wrapper around a + // class type. + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = assign({}, baseProps); + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { // If the value is an error, call this function immediately after it is thrown @@ -18639,10 +18680,14 @@ to return true:wantsResponderID| | var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedProps = resolveDefaultProps(Component, props); if (typeof Component === "function") { if (isFunctionClassComponent(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + false + ); workInProgress.tag = ClassComponent; { @@ -18658,6 +18703,8 @@ to return true:wantsResponderID| | renderLanes ); } else { + var _resolvedProps = resolveDefaultProps(Component, props); + workInProgress.tag = FunctionComponent; { @@ -18670,7 +18717,7 @@ to return true:wantsResponderID| | null, workInProgress, Component, - resolvedProps, + _resolvedProps, renderLanes ); } @@ -18678,6 +18725,8 @@ to return true:wantsResponderID| | var $$typeof = Component.$$typeof; if ($$typeof === REACT_FORWARD_REF_TYPE) { + var _resolvedProps2 = resolveDefaultProps(Component, props); + workInProgress.tag = ForwardRef; { @@ -18689,16 +18738,18 @@ to return true:wantsResponderID| | null, workInProgress, Component, - resolvedProps, + _resolvedProps2, renderLanes ); } else if ($$typeof === REACT_MEMO_TYPE) { + var _resolvedProps3 = resolveDefaultProps(Component, props); + workInProgress.tag = MemoComponent; return updateMemoComponent( null, workInProgress, Component, - resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + resolveDefaultProps(Component.type, _resolvedProps3), // The inner type can have defaults too renderLanes ); } @@ -20611,16 +20662,17 @@ to return true:wantsResponderID| | var _Component = workInProgress.type; var _unresolvedProps = workInProgress.pendingProps; - var _resolvedProps = + var _resolvedProps4 = resolveClassComponentProps( + _Component, + _unresolvedProps, workInProgress.elementType === _Component - ? _unresolvedProps - : resolveDefaultProps(_Component, _unresolvedProps); + ); return updateClassComponent( current, workInProgress, _Component, - _resolvedProps, + _resolvedProps4, renderLanes ); } @@ -20652,7 +20704,7 @@ to return true:wantsResponderID| | var type = workInProgress.type; var _unresolvedProps2 = workInProgress.pendingProps; - var _resolvedProps2 = + var _resolvedProps5 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2); @@ -20661,7 +20713,7 @@ to return true:wantsResponderID| | current, workInProgress, type, - _resolvedProps2, + _resolvedProps5, renderLanes ); } @@ -20685,14 +20737,14 @@ to return true:wantsResponderID| | var _type = workInProgress.type; var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. - var _resolvedProps3 = resolveDefaultProps(_type, _unresolvedProps3); + var _resolvedProps6 = resolveDefaultProps(_type, _unresolvedProps3); - _resolvedProps3 = resolveDefaultProps(_type.type, _resolvedProps3); + _resolvedProps6 = resolveDefaultProps(_type.type, _resolvedProps6); return updateMemoComponent( current, workInProgress, _type, - _resolvedProps3, + _resolvedProps6, renderLanes ); } @@ -20711,16 +20763,17 @@ to return true:wantsResponderID| | var _Component2 = workInProgress.type; var _unresolvedProps4 = workInProgress.pendingProps; - var _resolvedProps4 = + var _resolvedProps7 = resolveClassComponentProps( + _Component2, + _unresolvedProps4, workInProgress.elementType === _Component2 - ? _unresolvedProps4 - : resolveDefaultProps(_Component2, _unresolvedProps4); + ); return mountIncompleteClassComponent( current, workInProgress, _Component2, - _resolvedProps4, + _resolvedProps7, renderLanes ); } @@ -20729,16 +20782,17 @@ to return true:wantsResponderID| | var _Component3 = workInProgress.type; var _unresolvedProps5 = workInProgress.pendingProps; - var _resolvedProps5 = + var _resolvedProps8 = resolveClassComponentProps( + _Component3, + _unresolvedProps5, workInProgress.elementType === _Component3 - ? _unresolvedProps5 - : resolveDefaultProps(_Component3, _unresolvedProps5); + ); return mountIncompleteFunctionComponent( current, workInProgress, _Component3, - _resolvedProps5, + _resolvedProps8, renderLanes ); } @@ -22887,7 +22941,11 @@ to return true:wantsResponderID| | } function callComponentWillUnmountWithTimer(current, instance) { - instance.props = current.memoizedProps; + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); instance.state = current.memoizedState; if (shouldProfile(current)) { @@ -23072,7 +23130,8 @@ to return true:wantsResponderID| | { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -23100,9 +23159,11 @@ to return true:wantsResponderID| | } var snapshot = instance.getSnapshotBeforeUpdate( - finishedWork.elementType === finishedWork.type - ? prevProps - : resolveDefaultProps(finishedWork.type, prevProps), + resolveClassComponentProps( + finishedWork.type, + prevProps, + finishedWork.elementType === finishedWork.type + ), prevState ); @@ -23399,7 +23460,8 @@ to return true:wantsResponderID| | // TODO: revisit this when we implement resuming. { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -23443,17 +23505,19 @@ to return true:wantsResponderID| | } } } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); var prevState = current.memoizedState; // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -23517,7 +23581,8 @@ to return true:wantsResponderID| | { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -30508,7 +30573,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-e3d5c900"; + var ReactVersion = "19.0.0-canary-81190b3e"; function createPortal$1( children, diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index d3304beaae8ea..08bc76eb2e878 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<1c4989a9b48d58086b7232d24f7f3aaa>> + * @generated SignedSource<<23f2356ead4c48c2d682dd38827bd844>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_248 = { +var injectedNamesToPlugins$jscomp$inline_251 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_248 = { } } }, - isOrderingDirty$jscomp$inline_249 = !1, - pluginName$jscomp$inline_250; -for (pluginName$jscomp$inline_250 in injectedNamesToPlugins$jscomp$inline_248) + isOrderingDirty$jscomp$inline_252 = !1, + pluginName$jscomp$inline_253; +for (pluginName$jscomp$inline_253 in injectedNamesToPlugins$jscomp$inline_251) if ( - injectedNamesToPlugins$jscomp$inline_248.hasOwnProperty( - pluginName$jscomp$inline_250 + injectedNamesToPlugins$jscomp$inline_251.hasOwnProperty( + pluginName$jscomp$inline_253 ) ) { - var pluginModule$jscomp$inline_251 = - injectedNamesToPlugins$jscomp$inline_248[pluginName$jscomp$inline_250]; + var pluginModule$jscomp$inline_254 = + injectedNamesToPlugins$jscomp$inline_251[pluginName$jscomp$inline_253]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_250) || - namesToPlugins[pluginName$jscomp$inline_250] !== - pluginModule$jscomp$inline_251 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_253) || + namesToPlugins[pluginName$jscomp$inline_253] !== + pluginModule$jscomp$inline_254 ) { - if (namesToPlugins[pluginName$jscomp$inline_250]) + if (namesToPlugins[pluginName$jscomp$inline_253]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_250 + "`.") + (pluginName$jscomp$inline_253 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_250] = - pluginModule$jscomp$inline_251; - isOrderingDirty$jscomp$inline_249 = !0; + namesToPlugins[pluginName$jscomp$inline_253] = + pluginModule$jscomp$inline_254; + isOrderingDirty$jscomp$inline_252 = !0; } } -isOrderingDirty$jscomp$inline_249 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_252 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -4917,17 +4917,6 @@ enableAsyncActions && (HooksDispatcherOnRerender.useActionState = rerenderActionState)); enableAsyncActions && (HooksDispatcherOnRerender.useOptimistic = rerenderOptimistic); -function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; -} function applyDerivedStateFromProps( workInProgress, ctor, @@ -5077,6 +5066,31 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } +function resolveClassComponentProps( + Component, + baseProps, + alreadyResolvedDefaultProps +) { + var newProps = baseProps; + if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + for (var propName in Component) + void 0 === newProps[propName] && + (newProps[propName] = Component[propName]); + } + return newProps; +} +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + baseProps = assign({}, baseProps); + Component = Component.defaultProps; + for (var propName in Component) + void 0 === baseProps[propName] && + (baseProps[propName] = Component[propName]); + return baseProps; + } + return baseProps; +} var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { @@ -5633,7 +5647,12 @@ function updateClassComponent( (nextProps = !0); else if (null === current) { var instance = workInProgress.stateNode, - oldProps = workInProgress.memoizedProps; + unresolvedOldProps = workInProgress.memoizedProps, + oldProps = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context, contextType = Component.contextType; @@ -5647,10 +5666,11 @@ function updateClassComponent( hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; hasNewLifecycles || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== nextProps || oldContext !== contextType) && + ((unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( workInProgress, instance, @@ -5663,7 +5683,7 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; - oldProps !== nextProps || + unresolvedOldProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate @@ -5710,13 +5730,14 @@ function updateClassComponent( instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); oldProps = workInProgress.memoizedProps; - contextType = + contextType = resolveClassComponentProps( + Component, + oldProps, workInProgress.type === workInProgress.elementType - ? oldProps - : resolveDefaultProps(workInProgress.type, oldProps); + ); instance.props = contextType; hasNewLifecycles = workInProgress.pendingProps; - oldState = instance.context; + unresolvedOldProps = instance.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -5724,13 +5745,13 @@ function updateClassComponent( ? previousContext : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); - var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; + oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = - "function" === typeof getDerivedStateFromProps$jscomp$0 || + "function" === typeof oldState || "function" === typeof instance.getSnapshotBeforeUpdate) || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || oldState !== oldContext) && + ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, instance, @@ -5738,20 +5759,20 @@ function updateClassComponent( oldContext )); hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - instance.state = oldState; + unresolvedOldProps = workInProgress.memoizedState; + instance.state = unresolvedOldProps; processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || + unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && + ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, Component, - getDerivedStateFromProps$jscomp$0, + oldState, nextProps ), (newState = workInProgress.memoizedState)), @@ -5762,7 +5783,7 @@ function updateClassComponent( Component, contextType, nextProps, - oldState, + unresolvedOldProps, newState, oldContext ) || @@ -5784,11 +5805,11 @@ function updateClassComponent( (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), @@ -5798,11 +5819,11 @@ function updateClassComponent( (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } @@ -6483,57 +6504,61 @@ function beginWork(current, workInProgress, renderLanes) { var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var init = elementType._init; - elementType = init(elementType._payload); - workInProgress.type = elementType; - current = resolveDefaultProps(elementType, current); - if ("function" === typeof elementType) - shouldConstruct(elementType) - ? ((workInProgress.tag = 1), + var props = workInProgress.pendingProps; + current = elementType._init; + current = current(elementType._payload); + workInProgress.type = current; + if ("function" === typeof current) + shouldConstruct(current) + ? ((props = resolveClassComponentProps(current, props, !1)), + (workInProgress.tag = 1), (workInProgress = updateClassComponent( null, workInProgress, - elementType, current, + props, renderLanes ))) - : ((workInProgress.tag = 0), + : ((props = resolveDefaultProps(current, props)), + (workInProgress.tag = 0), (workInProgress = updateFunctionComponent( null, workInProgress, - elementType, current, + props, renderLanes ))); else { - if (void 0 !== elementType && null !== elementType) + if (void 0 !== current && null !== current) if ( - ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ((elementType = current.$$typeof), + elementType === REACT_FORWARD_REF_TYPE) ) { + props = resolveDefaultProps(current, props); workInProgress.tag = 11; workInProgress = updateForwardRef( null, workInProgress, - elementType, current, + props, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { + } else if (elementType === REACT_MEMO_TYPE) { + props = resolveDefaultProps(current, props); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, - elementType, - resolveDefaultProps(elementType.type, current), + current, + resolveDefaultProps(current.type, props), renderLanes ); break a; } throw Error( "Element type is invalid. Received a promise that resolves to: " + - elementType + + current + ". Lazy element type must resolve to a class or function." ); } @@ -6541,33 +6566,33 @@ function beginWork(current, workInProgress, renderLanes) { return workInProgress; case 0: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateFunctionComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); case 1: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), updateClassComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6576,34 +6601,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; - init = workInProgress.memoizedState; - elementType = init.element; + elementType = workInProgress.memoizedState; + props = elementType.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== init.cache && + nextCache !== elementType.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - init = nextProps.element; - init === elementType + elementType = nextProps.element; + elementType === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, init, renderLanes), + : (reconcileChildren(current, workInProgress, elementType, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - elementType = workInProgress.pendingProps.children; + props = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - init = renderWithHooks( + elementType = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6611,10 +6636,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue2 = init; + HostTransitionContext._currentValue2 = elementType; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== init && + current.memoizedState.memoizedState !== elementType && propagateContextChange( workInProgress, HostTransitionContext, @@ -6622,7 +6647,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; case 6: return null; @@ -6634,35 +6659,30 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (elementType = workInProgress.pendingProps), + (props = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - elementType, + props, renderLanes )) - : reconcileChildren( - current, - workInProgress, - elementType, - renderLanes - ), + : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 11: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateForwardRef( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6698,17 +6718,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - elementType = enableRenderableContext + props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - init = workInProgress.pendingProps; + elementType = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); + nextCache = elementType.value; + pushProvider(workInProgress, props, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === init.children && + nextProps.children === elementType.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -6718,35 +6738,39 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); + } else propagateContextChange(workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (init = enableRenderableContext + (elementType = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (elementType = workInProgress.pendingProps.children), + (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (init = readContext(init)), - (elementType = elementType(init)), + (elementType = readContext(elementType)), + (props = props(elementType)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 14: return ( - (elementType = workInProgress.type), - (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), - (init = resolveDefaultProps(elementType.type, init)), + (props = workInProgress.type), + (elementType = resolveDefaultProps(props, workInProgress.pendingProps)), + (elementType = resolveDefaultProps(props.type, elementType)), updateMemoComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6760,24 +6784,24 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(elementType) + isContextProvider(props) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, elementType, init), - mountClassInstance(workInProgress, elementType, init, renderLanes), + constructClassInstance(workInProgress, props, elementType), + mountClassInstance(workInProgress, props, elementType, renderLanes), finishClassComponent( null, workInProgress, - elementType, + props, !0, current, renderLanes @@ -6785,19 +6809,19 @@ function beginWork(current, workInProgress, renderLanes) { ); case 28: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 0), updateFunctionComponent( null, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6808,39 +6832,40 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(CacheContext)), + (props = readContext(CacheContext)), null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), + ? ((elementType = peekCacheFromPool()), + null === elementType && + ((elementType = workInProgressRoot), (nextProps = createCache()), - (init.pooledCache = nextProps), + (elementType.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), + null !== nextProps && + (elementType.pooledCacheLanes |= renderLanes), + (elementType = nextProps)), (workInProgress.memoizedState = { - parent: elementType, - cache: init + parent: props, + cache: elementType }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) + pushProvider(workInProgress, CacheContext, elementType)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), + (elementType = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== elementType - ? ((init = { parent: elementType, cache: elementType }), - (workInProgress.memoizedState = init), + elementType.parent !== props + ? ((elementType = { parent: props, cache: props }), + (workInProgress.memoizedState = elementType), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, elementType)) - : ((elementType = nextProps.cache), - pushProvider(workInProgress, CacheContext, elementType), - elementType !== init.cache && + elementType), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== elementType.cache && propagateContextChange( workInProgress, CacheContext, @@ -7200,14 +7225,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$75 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), + for (var lastTailNode$78 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$75 + null === lastTailNode$78 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$75.sibling = null); + : (lastTailNode$78.sibling = null); } } function bubbleProperties(completedWork) { @@ -7217,19 +7242,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags & 31457280), - (subtreeFlags |= child$76.flags & 31457280), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (var child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags & 31457280), + (subtreeFlags |= child$79.flags & 31457280), + (child$79.return = completedWork), + (child$79 = child$79.sibling); else - for (child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags), - (subtreeFlags |= child$76.flags), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags), + (subtreeFlags |= child$79.flags), + (child$79.return = completedWork), + (child$79 = child$79.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7741,6 +7766,15 @@ var offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null; +function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + instance.componentWillUnmount(); +} function safelyAttachRef(current, nearestMountedAncestor) { try { var ref = current.ref; @@ -7780,8 +7814,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$98) { - captureCommitPhaseError(current, nearestMountedAncestor, error$98); + } catch (error$101) { + captureCommitPhaseError(current, nearestMountedAncestor, error$101); } else ref.current = null; } @@ -7815,13 +7849,14 @@ function commitBeforeMutationEffects(root, firstChild) { break; case 1: if (0 !== (flags & 1024) && null !== current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState, + var prevState = current.memoizedState, instance = root.stateNode, snapshot = instance.getSnapshotBeforeUpdate( - root.elementType === root.type - ? prevProps - : resolveDefaultProps(root.type, prevProps), + resolveClassComponentProps( + root.type, + current.memoizedProps, + root.elementType === root.type + ), prevState ); instance.__reactInternalSnapshotBeforeUpdate = snapshot; @@ -7885,10 +7920,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$99 = effect.create, + var create$102 = effect.create, inst = effect.inst; - create$99 = create$99(); - inst.destroy = create$99; + create$102 = create$102(); + inst.destroy = create$102; } effect = effect.next; } while (effect !== finishedWork); @@ -7940,10 +7975,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); current = current.memoizedState; try { finishedRoot.componentDidUpdate( @@ -7951,11 +7987,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$103) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$103 ); } } @@ -8134,9 +8170,7 @@ function commitDeletionEffectsOnFiber( "function" === typeof updateQueue.componentWillUnmount) ) try { - (updateQueue.props = deletedFiber.memoizedProps), - (updateQueue.state = deletedFiber.memoizedState), - updateQueue.componentWillUnmount(); + callComponentWillUnmountWithTimer(deletedFiber, updateQueue); } catch (error) { captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error); } @@ -8249,8 +8283,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$102) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$102); + } catch (error$105) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$105); } } break; @@ -8395,10 +8429,7 @@ function recursivelyTraverseDisappearLayoutEffects(parentFiber) { var current = finishedWork, nearestMountedAncestor = finishedWork.return; try { - var current$jscomp$0 = current; - instance.props = current$jscomp$0.memoizedProps; - instance.state = current$jscomp$0.memoizedState; - instance.componentWillUnmount(); + callComponentWillUnmountWithTimer(current, instance); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } @@ -9492,8 +9523,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$114) { - handleThrow(root, thrownValue$114); + } catch (thrownValue$117) { + handleThrow(root, thrownValue$117); } while (1); lanes && root.shellSuspendCounter++; @@ -9601,8 +9632,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$116) { - handleThrow(root, thrownValue$116); + } catch (thrownValue$119) { + handleThrow(root, thrownValue$119); } while (1); resetContextDependencies(); @@ -10607,10 +10638,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1092 = { + devToolsConfig$jscomp$inline_1101 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-0e44f579", + version: "19.0.0-canary-788ddcaa", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10626,11 +10657,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1326 = { - bundleType: devToolsConfig$jscomp$inline_1092.bundleType, - version: devToolsConfig$jscomp$inline_1092.version, - rendererPackageName: devToolsConfig$jscomp$inline_1092.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1092.rendererConfig, +var internals$jscomp$inline_1334 = { + bundleType: devToolsConfig$jscomp$inline_1101.bundleType, + version: devToolsConfig$jscomp$inline_1101.version, + rendererPackageName: devToolsConfig$jscomp$inline_1101.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1101.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10646,26 +10677,26 @@ var internals$jscomp$inline_1326 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1092.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1101.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-0e44f579" + reconcilerVersion: "19.0.0-canary-788ddcaa" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1327 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1335 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1327.isDisabled && - hook$jscomp$inline_1327.supportsFiber + !hook$jscomp$inline_1335.isDisabled && + hook$jscomp$inline_1335.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1327.inject( - internals$jscomp$inline_1326 + (rendererID = hook$jscomp$inline_1335.inject( + internals$jscomp$inline_1334 )), - (injectedHook = hook$jscomp$inline_1327); + (injectedHook = hook$jscomp$inline_1335); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 4f579279aee66..5a8f0357f4733 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9617af24c78110fa36cd5a86db603668>> + * @generated SignedSource<<04c4d87fea46bf33d7da29619056156a>> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_264 = { +var injectedNamesToPlugins$jscomp$inline_267 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_264 = { } } }, - isOrderingDirty$jscomp$inline_265 = !1, - pluginName$jscomp$inline_266; -for (pluginName$jscomp$inline_266 in injectedNamesToPlugins$jscomp$inline_264) + isOrderingDirty$jscomp$inline_268 = !1, + pluginName$jscomp$inline_269; +for (pluginName$jscomp$inline_269 in injectedNamesToPlugins$jscomp$inline_267) if ( - injectedNamesToPlugins$jscomp$inline_264.hasOwnProperty( - pluginName$jscomp$inline_266 + injectedNamesToPlugins$jscomp$inline_267.hasOwnProperty( + pluginName$jscomp$inline_269 ) ) { - var pluginModule$jscomp$inline_267 = - injectedNamesToPlugins$jscomp$inline_264[pluginName$jscomp$inline_266]; + var pluginModule$jscomp$inline_270 = + injectedNamesToPlugins$jscomp$inline_267[pluginName$jscomp$inline_269]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_266) || - namesToPlugins[pluginName$jscomp$inline_266] !== - pluginModule$jscomp$inline_267 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_269) || + namesToPlugins[pluginName$jscomp$inline_269] !== + pluginModule$jscomp$inline_270 ) { - if (namesToPlugins[pluginName$jscomp$inline_266]) + if (namesToPlugins[pluginName$jscomp$inline_269]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_266 + "`.") + (pluginName$jscomp$inline_269 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_266] = - pluginModule$jscomp$inline_267; - isOrderingDirty$jscomp$inline_265 = !0; + namesToPlugins[pluginName$jscomp$inline_269] = + pluginModule$jscomp$inline_270; + isOrderingDirty$jscomp$inline_268 = !0; } } -isOrderingDirty$jscomp$inline_265 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_268 && recomputePluginOrdering(); var emptyObject$1 = {}, removedKeys = null, removedKeyCount = 0, @@ -5104,17 +5104,6 @@ function transferActualDuration(fiber) { for (var child = fiber.child; child; ) (fiber.actualDuration += child.actualDuration), (child = child.sibling); } -function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; -} function applyDerivedStateFromProps( workInProgress, ctor, @@ -5269,6 +5258,31 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } +function resolveClassComponentProps( + Component, + baseProps, + alreadyResolvedDefaultProps +) { + var newProps = baseProps; + if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + for (var propName in Component) + void 0 === newProps[propName] && + (newProps[propName] = Component[propName]); + } + return newProps; +} +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + baseProps = assign({}, baseProps); + Component = Component.defaultProps; + for (var propName in Component) + void 0 === baseProps[propName] && + (baseProps[propName] = Component[propName]); + return baseProps; + } + return baseProps; +} var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { @@ -5832,7 +5846,12 @@ function updateClassComponent( (nextProps = !0); else if (null === current) { var instance = workInProgress.stateNode, - oldProps = workInProgress.memoizedProps; + unresolvedOldProps = workInProgress.memoizedProps, + oldProps = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context, contextType = Component.contextType; @@ -5846,10 +5865,11 @@ function updateClassComponent( hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; hasNewLifecycles || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== nextProps || oldContext !== contextType) && + ((unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( workInProgress, instance, @@ -5862,7 +5882,7 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; - oldProps !== nextProps || + unresolvedOldProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate @@ -5909,13 +5929,14 @@ function updateClassComponent( instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); oldProps = workInProgress.memoizedProps; - contextType = + contextType = resolveClassComponentProps( + Component, + oldProps, workInProgress.type === workInProgress.elementType - ? oldProps - : resolveDefaultProps(workInProgress.type, oldProps); + ); instance.props = contextType; hasNewLifecycles = workInProgress.pendingProps; - oldState = instance.context; + unresolvedOldProps = instance.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -5923,13 +5944,13 @@ function updateClassComponent( ? previousContext : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); - var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; + oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = - "function" === typeof getDerivedStateFromProps$jscomp$0 || + "function" === typeof oldState || "function" === typeof instance.getSnapshotBeforeUpdate) || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || oldState !== oldContext) && + ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, instance, @@ -5937,20 +5958,20 @@ function updateClassComponent( oldContext )); hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - instance.state = oldState; + unresolvedOldProps = workInProgress.memoizedState; + instance.state = unresolvedOldProps; processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || + unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && + ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, Component, - getDerivedStateFromProps$jscomp$0, + oldState, nextProps ), (newState = workInProgress.memoizedState)), @@ -5961,7 +5982,7 @@ function updateClassComponent( Component, contextType, nextProps, - oldState, + unresolvedOldProps, newState, oldContext ) || @@ -5983,11 +6004,11 @@ function updateClassComponent( (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), @@ -5997,11 +6018,11 @@ function updateClassComponent( (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } @@ -6707,57 +6728,61 @@ function beginWork(current, workInProgress, renderLanes) { var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var init = elementType._init; - elementType = init(elementType._payload); - workInProgress.type = elementType; - current = resolveDefaultProps(elementType, current); - if ("function" === typeof elementType) - shouldConstruct(elementType) - ? ((workInProgress.tag = 1), + var props = workInProgress.pendingProps; + current = elementType._init; + current = current(elementType._payload); + workInProgress.type = current; + if ("function" === typeof current) + shouldConstruct(current) + ? ((props = resolveClassComponentProps(current, props, !1)), + (workInProgress.tag = 1), (workInProgress = updateClassComponent( null, workInProgress, - elementType, current, + props, renderLanes ))) - : ((workInProgress.tag = 0), + : ((props = resolveDefaultProps(current, props)), + (workInProgress.tag = 0), (workInProgress = updateFunctionComponent( null, workInProgress, - elementType, current, + props, renderLanes ))); else { - if (void 0 !== elementType && null !== elementType) + if (void 0 !== current && null !== current) if ( - ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ((elementType = current.$$typeof), + elementType === REACT_FORWARD_REF_TYPE) ) { + props = resolveDefaultProps(current, props); workInProgress.tag = 11; workInProgress = updateForwardRef( null, workInProgress, - elementType, current, + props, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { + } else if (elementType === REACT_MEMO_TYPE) { + props = resolveDefaultProps(current, props); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, - elementType, - resolveDefaultProps(elementType.type, current), + current, + resolveDefaultProps(current.type, props), renderLanes ); break a; } throw Error( "Element type is invalid. Received a promise that resolves to: " + - elementType + + current + ". Lazy element type must resolve to a class or function." ); } @@ -6765,33 +6790,33 @@ function beginWork(current, workInProgress, renderLanes) { return workInProgress; case 0: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateFunctionComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); case 1: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), updateClassComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6800,34 +6825,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; - init = workInProgress.memoizedState; - elementType = init.element; + elementType = workInProgress.memoizedState; + props = elementType.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== init.cache && + nextCache !== elementType.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - init = nextProps.element; - init === elementType + elementType = nextProps.element; + elementType === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, init, renderLanes), + : (reconcileChildren(current, workInProgress, elementType, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - elementType = workInProgress.pendingProps.children; + props = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - init = renderWithHooks( + elementType = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6835,10 +6860,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue2 = init; + HostTransitionContext._currentValue2 = elementType; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== init && + current.memoizedState.memoizedState !== elementType && propagateContextChange( workInProgress, HostTransitionContext, @@ -6846,7 +6871,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; case 6: return null; @@ -6858,35 +6883,30 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (elementType = workInProgress.pendingProps), + (props = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - elementType, + props, renderLanes )) - : reconcileChildren( - current, - workInProgress, - elementType, - renderLanes - ), + : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 11: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateForwardRef( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6913,9 +6933,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (elementType = workInProgress.stateNode), - (elementType.effectDuration = 0), - (elementType.passiveEffectDuration = 0), + (props = workInProgress.stateNode), + (props.effectDuration = 0), + (props.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -6926,17 +6946,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - elementType = enableRenderableContext + props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - init = workInProgress.pendingProps; + elementType = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); + nextCache = elementType.value; + pushProvider(workInProgress, props, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === init.children && + nextProps.children === elementType.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -6946,37 +6966,41 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); + } else propagateContextChange(workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (init = enableRenderableContext + (elementType = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (elementType = workInProgress.pendingProps.children), + (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (init = readContext(init)), + (elementType = readContext(elementType)), markComponentRenderStarted(workInProgress), - (elementType = elementType(init)), + (props = props(elementType)), markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 14: return ( - (elementType = workInProgress.type), - (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), - (init = resolveDefaultProps(elementType.type, init)), + (props = workInProgress.type), + (elementType = resolveDefaultProps(props, workInProgress.pendingProps)), + (elementType = resolveDefaultProps(props.type, elementType)), updateMemoComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6990,24 +7014,24 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(elementType) + isContextProvider(props) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, elementType, init), - mountClassInstance(workInProgress, elementType, init, renderLanes), + constructClassInstance(workInProgress, props, elementType), + mountClassInstance(workInProgress, props, elementType, renderLanes), finishClassComponent( null, workInProgress, - elementType, + props, !0, current, renderLanes @@ -7015,19 +7039,19 @@ function beginWork(current, workInProgress, renderLanes) { ); case 28: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 0), updateFunctionComponent( null, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -7038,39 +7062,40 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(CacheContext)), + (props = readContext(CacheContext)), null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), + ? ((elementType = peekCacheFromPool()), + null === elementType && + ((elementType = workInProgressRoot), (nextProps = createCache()), - (init.pooledCache = nextProps), + (elementType.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), + null !== nextProps && + (elementType.pooledCacheLanes |= renderLanes), + (elementType = nextProps)), (workInProgress.memoizedState = { - parent: elementType, - cache: init + parent: props, + cache: elementType }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) + pushProvider(workInProgress, CacheContext, elementType)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), + (elementType = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== elementType - ? ((init = { parent: elementType, cache: elementType }), - (workInProgress.memoizedState = init), + elementType.parent !== props + ? ((elementType = { parent: props, cache: props }), + (workInProgress.memoizedState = elementType), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, elementType)) - : ((elementType = nextProps.cache), - pushProvider(workInProgress, CacheContext, elementType), - elementType !== init.cache && + elementType), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== elementType.cache && propagateContextChange( workInProgress, CacheContext, @@ -7430,14 +7455,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$79 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$79 = lastTailNode), + for (var lastTailNode$82 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$82 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$79 + null === lastTailNode$82 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$79.sibling = null); + : (lastTailNode$82.sibling = null); } } function bubbleProperties(completedWork) { @@ -7449,53 +7474,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$81 = completedWork.selfBaseDuration, - child$82 = completedWork.child; - null !== child$82; + var treeBaseDuration$84 = completedWork.selfBaseDuration, + child$85 = completedWork.child; + null !== child$85; ) - (newChildLanes |= child$82.lanes | child$82.childLanes), - (subtreeFlags |= child$82.subtreeFlags & 31457280), - (subtreeFlags |= child$82.flags & 31457280), - (treeBaseDuration$81 += child$82.treeBaseDuration), - (child$82 = child$82.sibling); - completedWork.treeBaseDuration = treeBaseDuration$81; + (newChildLanes |= child$85.lanes | child$85.childLanes), + (subtreeFlags |= child$85.subtreeFlags & 31457280), + (subtreeFlags |= child$85.flags & 31457280), + (treeBaseDuration$84 += child$85.treeBaseDuration), + (child$85 = child$85.sibling); + completedWork.treeBaseDuration = treeBaseDuration$84; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$84 = completedWork.child; + null !== treeBaseDuration$84; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$81.flags & 31457280), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$84.lanes | treeBaseDuration$84.childLanes), + (subtreeFlags |= treeBaseDuration$84.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$84.flags & 31457280), + (treeBaseDuration$84.return = completedWork), + (treeBaseDuration$84 = treeBaseDuration$84.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$81 = completedWork.actualDuration; - child$82 = completedWork.selfBaseDuration; + treeBaseDuration$84 = completedWork.actualDuration; + child$85 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$81 += child.actualDuration), - (child$82 += child.treeBaseDuration), + (treeBaseDuration$84 += child.actualDuration), + (child$85 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$81; - completedWork.treeBaseDuration = child$82; + completedWork.actualDuration = treeBaseDuration$84; + completedWork.treeBaseDuration = child$85; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$84 = completedWork.child; + null !== treeBaseDuration$84; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags), - (subtreeFlags |= treeBaseDuration$81.flags), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$84.lanes | treeBaseDuration$84.childLanes), + (subtreeFlags |= treeBaseDuration$84.subtreeFlags), + (subtreeFlags |= treeBaseDuration$84.flags), + (treeBaseDuration$84.return = completedWork), + (treeBaseDuration$84 = treeBaseDuration$84.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8037,7 +8062,11 @@ function shouldProfile(current) { return 0 !== (current.mode & 2) && 0 !== (executionContext & 4); } function callComponentWillUnmountWithTimer(current, instance) { - instance.props = current.memoizedProps; + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); instance.state = current.memoizedState; if (shouldProfile(current)) try { @@ -8104,8 +8133,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$107) { - captureCommitPhaseError(current, nearestMountedAncestor, error$107); + } catch (error$110) { + captureCommitPhaseError(current, nearestMountedAncestor, error$110); } else ref.current = null; } @@ -8139,13 +8168,14 @@ function commitBeforeMutationEffects(root, firstChild) { break; case 1: if (0 !== (flags & 1024) && null !== current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState, + var prevState = current.memoizedState, instance = root.stateNode, snapshot = instance.getSnapshotBeforeUpdate( - root.elementType === root.type - ? prevProps - : resolveDefaultProps(root.type, prevProps), + resolveClassComponentProps( + root.type, + current.memoizedProps, + root.elementType === root.type + ), prevState ); instance.__reactInternalSnapshotBeforeUpdate = snapshot; @@ -8238,10 +8268,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$108 = effect.create, + var create$111 = effect.create, inst = effect.inst; - create$108 = create$108(); - inst.destroy = create$108; + create$111 = create$111(); + inst.destroy = create$111; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -8269,8 +8299,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$110) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$110); + } catch (error$113) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$113); } } function commitClassCallbacks(finishedWork) { @@ -8359,18 +8389,19 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$111) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$114 ); } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); current = current.memoizedState; if (shouldProfile(finishedWork)) { try { @@ -8380,11 +8411,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$115 ); } recordLayoutEffectDuration(finishedWork); @@ -8395,11 +8426,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$113) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$116 ); } } @@ -8720,22 +8751,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$116) { + } catch (error$119) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$119 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$117) { + } catch (error$120) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$117 + error$120 ); } } @@ -9032,8 +9063,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$125) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$125); + } catch (error$128) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$128); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10063,8 +10094,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$133) { + handleThrow(root, thrownValue$133); } while (1); lanes && root.shellSuspendCounter++; @@ -10183,8 +10214,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$132) { - handleThrow(root, thrownValue$132); + } catch (thrownValue$135) { + handleThrow(root, thrownValue$135); } while (1); resetContextDependencies(); @@ -10550,7 +10581,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$109 = commitTime, + commitTime$112 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -10558,7 +10589,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$109 + commitTime$112 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -11312,10 +11343,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1174 = { + devToolsConfig$jscomp$inline_1183 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-44851f70", + version: "19.0.0-canary-2ce5f83e", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11345,10 +11376,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1174.bundleType, - version: devToolsConfig$jscomp$inline_1174.version, - rendererPackageName: devToolsConfig$jscomp$inline_1174.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1174.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1183.bundleType, + version: devToolsConfig$jscomp$inline_1183.version, + rendererPackageName: devToolsConfig$jscomp$inline_1183.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1183.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11364,14 +11395,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1174.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1183.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-44851f70" + reconcilerVersion: "19.0.0-canary-2ce5f83e" }); exports.createPortal = function (children, containerTag) { return createPortal$1( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 9f492ad86d06b..379710153814b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<791b1a91f550557ae891a61918d18146>> */ "use strict"; @@ -15911,24 +15911,6 @@ to return true:wantsResponderID| | } } - function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - // Resolve default props. Taken from ReactElement - var props = assign({}, baseProps); - var defaultProps = Component.defaultProps; - - for (var propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - - return props; - } - - return baseProps; - } - var fakeInternalInstance = {}; var didWarnAboutStateAssignmentForComponent; var didWarnAboutUninitializedState; @@ -16760,7 +16742,12 @@ to return true:wantsResponderID| | renderLanes ) { var instance = workInProgress.stateNode; - var oldProps = workInProgress.memoizedProps; + var unresolvedOldProps = workInProgress.memoizedProps; + var oldProps = resolveClassComponentProps( + ctor, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context; var contextType = ctor.contextType; @@ -16783,7 +16770,13 @@ to return true:wantsResponderID| | var getDerivedStateFromProps = ctor.getDerivedStateFromProps; var hasNewLifecycles = typeof getDerivedStateFromProps === "function" || - typeof instance.getSnapshotBeforeUpdate === "function"; // Note: During these life-cycles, instance.props/instance.state are what + typeof instance.getSnapshotBeforeUpdate === "function"; // When comparing whether props changed, we should compare using the + // unresolved props object that is stored on the fiber, rather than the + // one that gets assigned to the instance, because that object may have been + // cloned to resolve default props and/or remove `ref`. + + var unresolvedNewProps = workInProgress.pendingProps; + var didReceiveNewProps = unresolvedNewProps !== unresolvedOldProps; // Note: During these life-cycles, instance.props/instance.state are what // ever the previously attempted to render - not the "current". However, // during componentDidUpdate we pass the "current" props. // In order to support react-lifecycles-compat polyfilled components, @@ -16794,7 +16787,7 @@ to return true:wantsResponderID| | (typeof instance.UNSAFE_componentWillReceiveProps === "function" || typeof instance.componentWillReceiveProps === "function") ) { - if (oldProps !== newProps || oldContext !== nextContext) { + if (didReceiveNewProps || oldContext !== nextContext) { callComponentWillReceiveProps( workInProgress, instance, @@ -16812,7 +16805,7 @@ to return true:wantsResponderID| | newState = workInProgress.memoizedState; if ( - oldProps === newProps && + !didReceiveNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() @@ -16909,10 +16902,11 @@ to return true:wantsResponderID| | var instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); var unresolvedOldProps = workInProgress.memoizedProps; - var oldProps = + var oldProps = resolveClassComponentProps( + ctor, + unresolvedOldProps, workInProgress.type === workInProgress.elementType - ? unresolvedOldProps - : resolveDefaultProps(workInProgress.type, unresolvedOldProps); + ); instance.props = oldProps; var unresolvedNewProps = workInProgress.pendingProps; var oldContext = instance.context; @@ -17081,6 +17075,53 @@ to return true:wantsResponderID| | return shouldUpdate; } + function resolveClassComponentProps( + Component, + baseProps, // Only resolve default props if this is a lazy component. Otherwise, they + // would have already been resolved by the JSX runtime. + // TODO: We're going to remove default prop resolution from the JSX runtime + // and keep it only for class components. As part of that change, we should + // remove this extra check. + alreadyResolvedDefaultProps + ) { + var newProps = baseProps; // Resolve default props. Taken from old JSX runtime, where this used to live. + + var defaultProps = Component.defaultProps; + + if (defaultProps && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + + for (var propName in defaultProps) { + if (newProps[propName] === undefined) { + newProps[propName] = defaultProps[propName]; + } + } + } + + return newProps; + } + + function resolveDefaultProps(Component, baseProps) { + // TODO: Remove support for default props for everything except class + // components, including setting default props on a lazy wrapper around a + // class type. + if (Component && Component.defaultProps) { + // Resolve default props. Taken from ReactElement + var props = assign({}, baseProps); + var defaultProps = Component.defaultProps; + + for (var propName in defaultProps) { + if (props[propName] === undefined) { + props[propName] = defaultProps[propName]; + } + } + + return props; + } + + return baseProps; + } + var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { // If the value is an error, call this function immediately after it is thrown @@ -18910,10 +18951,14 @@ to return true:wantsResponderID| | var Component = init(payload); // Store the unwrapped component in the type. workInProgress.type = Component; - var resolvedProps = resolveDefaultProps(Component, props); if (typeof Component === "function") { if (isFunctionClassComponent(Component)) { + var resolvedProps = resolveClassComponentProps( + Component, + props, + false + ); workInProgress.tag = ClassComponent; { @@ -18929,6 +18974,8 @@ to return true:wantsResponderID| | renderLanes ); } else { + var _resolvedProps = resolveDefaultProps(Component, props); + workInProgress.tag = FunctionComponent; { @@ -18941,7 +18988,7 @@ to return true:wantsResponderID| | null, workInProgress, Component, - resolvedProps, + _resolvedProps, renderLanes ); } @@ -18949,6 +18996,8 @@ to return true:wantsResponderID| | var $$typeof = Component.$$typeof; if ($$typeof === REACT_FORWARD_REF_TYPE) { + var _resolvedProps2 = resolveDefaultProps(Component, props); + workInProgress.tag = ForwardRef; { @@ -18960,16 +19009,18 @@ to return true:wantsResponderID| | null, workInProgress, Component, - resolvedProps, + _resolvedProps2, renderLanes ); } else if ($$typeof === REACT_MEMO_TYPE) { + var _resolvedProps3 = resolveDefaultProps(Component, props); + workInProgress.tag = MemoComponent; return updateMemoComponent( null, workInProgress, Component, - resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too + resolveDefaultProps(Component.type, _resolvedProps3), // The inner type can have defaults too renderLanes ); } @@ -20882,16 +20933,17 @@ to return true:wantsResponderID| | var _Component = workInProgress.type; var _unresolvedProps = workInProgress.pendingProps; - var _resolvedProps = + var _resolvedProps4 = resolveClassComponentProps( + _Component, + _unresolvedProps, workInProgress.elementType === _Component - ? _unresolvedProps - : resolveDefaultProps(_Component, _unresolvedProps); + ); return updateClassComponent( current, workInProgress, _Component, - _resolvedProps, + _resolvedProps4, renderLanes ); } @@ -20923,7 +20975,7 @@ to return true:wantsResponderID| | var type = workInProgress.type; var _unresolvedProps2 = workInProgress.pendingProps; - var _resolvedProps2 = + var _resolvedProps5 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2); @@ -20932,7 +20984,7 @@ to return true:wantsResponderID| | current, workInProgress, type, - _resolvedProps2, + _resolvedProps5, renderLanes ); } @@ -20956,14 +21008,14 @@ to return true:wantsResponderID| | var _type = workInProgress.type; var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. - var _resolvedProps3 = resolveDefaultProps(_type, _unresolvedProps3); + var _resolvedProps6 = resolveDefaultProps(_type, _unresolvedProps3); - _resolvedProps3 = resolveDefaultProps(_type.type, _resolvedProps3); + _resolvedProps6 = resolveDefaultProps(_type.type, _resolvedProps6); return updateMemoComponent( current, workInProgress, _type, - _resolvedProps3, + _resolvedProps6, renderLanes ); } @@ -20982,16 +21034,17 @@ to return true:wantsResponderID| | var _Component2 = workInProgress.type; var _unresolvedProps4 = workInProgress.pendingProps; - var _resolvedProps4 = + var _resolvedProps7 = resolveClassComponentProps( + _Component2, + _unresolvedProps4, workInProgress.elementType === _Component2 - ? _unresolvedProps4 - : resolveDefaultProps(_Component2, _unresolvedProps4); + ); return mountIncompleteClassComponent( current, workInProgress, _Component2, - _resolvedProps4, + _resolvedProps7, renderLanes ); } @@ -21000,16 +21053,17 @@ to return true:wantsResponderID| | var _Component3 = workInProgress.type; var _unresolvedProps5 = workInProgress.pendingProps; - var _resolvedProps5 = + var _resolvedProps8 = resolveClassComponentProps( + _Component3, + _unresolvedProps5, workInProgress.elementType === _Component3 - ? _unresolvedProps5 - : resolveDefaultProps(_Component3, _unresolvedProps5); + ); return mountIncompleteFunctionComponent( current, workInProgress, _Component3, - _resolvedProps5, + _resolvedProps8, renderLanes ); } @@ -22928,7 +22982,11 @@ to return true:wantsResponderID| | } function callComponentWillUnmountWithTimer(current, instance) { - instance.props = current.memoizedProps; + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); instance.state = current.memoizedState; if (shouldProfile(current)) { @@ -23113,7 +23171,8 @@ to return true:wantsResponderID| | { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -23141,9 +23200,11 @@ to return true:wantsResponderID| | } var snapshot = instance.getSnapshotBeforeUpdate( - finishedWork.elementType === finishedWork.type - ? prevProps - : resolveDefaultProps(finishedWork.type, prevProps), + resolveClassComponentProps( + finishedWork.type, + prevProps, + finishedWork.elementType === finishedWork.type + ), prevState ); @@ -23440,7 +23501,8 @@ to return true:wantsResponderID| | // TODO: revisit this when we implement resuming. { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -23484,17 +23546,19 @@ to return true:wantsResponderID| | } } } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); var prevState = current.memoizedState; // We could update instance props and state here, // but instead we rely on them being set during last render. // TODO: revisit this when we implement resuming. { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -23558,7 +23622,8 @@ to return true:wantsResponderID| | { if ( - finishedWork.type === finishedWork.elementType && + !finishedWork.type.defaultProps && + !("ref" in finishedWork.memoizedProps) && !didWarnAboutReassigningProps ) { if (instance.props !== finishedWork.memoizedProps) { @@ -30948,7 +31013,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-a548195b"; + var ReactVersion = "19.0.0-canary-7d1e5131"; function createPortal$1( children, diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 6775f4d49c5b2..5eddef61d850b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_255 = { +var injectedNamesToPlugins$jscomp$inline_258 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_255 = { } } }, - isOrderingDirty$jscomp$inline_256 = !1, - pluginName$jscomp$inline_257; -for (pluginName$jscomp$inline_257 in injectedNamesToPlugins$jscomp$inline_255) + isOrderingDirty$jscomp$inline_259 = !1, + pluginName$jscomp$inline_260; +for (pluginName$jscomp$inline_260 in injectedNamesToPlugins$jscomp$inline_258) if ( - injectedNamesToPlugins$jscomp$inline_255.hasOwnProperty( - pluginName$jscomp$inline_257 + injectedNamesToPlugins$jscomp$inline_258.hasOwnProperty( + pluginName$jscomp$inline_260 ) ) { - var pluginModule$jscomp$inline_258 = - injectedNamesToPlugins$jscomp$inline_255[pluginName$jscomp$inline_257]; + var pluginModule$jscomp$inline_261 = + injectedNamesToPlugins$jscomp$inline_258[pluginName$jscomp$inline_260]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_257) || - namesToPlugins[pluginName$jscomp$inline_257] !== - pluginModule$jscomp$inline_258 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_260) || + namesToPlugins[pluginName$jscomp$inline_260] !== + pluginModule$jscomp$inline_261 ) { - if (namesToPlugins[pluginName$jscomp$inline_257]) + if (namesToPlugins[pluginName$jscomp$inline_260]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_257 + "`.") + (pluginName$jscomp$inline_260 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_257] = - pluginModule$jscomp$inline_258; - isOrderingDirty$jscomp$inline_256 = !0; + namesToPlugins[pluginName$jscomp$inline_260] = + pluginModule$jscomp$inline_261; + isOrderingDirty$jscomp$inline_259 = !0; } } -isOrderingDirty$jscomp$inline_256 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_259 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -4982,17 +4982,6 @@ enableAsyncActions && (HooksDispatcherOnRerender.useActionState = rerenderActionState)); enableAsyncActions && (HooksDispatcherOnRerender.useOptimistic = rerenderOptimistic); -function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; -} function applyDerivedStateFromProps( workInProgress, ctor, @@ -5142,6 +5131,31 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } +function resolveClassComponentProps( + Component, + baseProps, + alreadyResolvedDefaultProps +) { + var newProps = baseProps; + if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + for (var propName in Component) + void 0 === newProps[propName] && + (newProps[propName] = Component[propName]); + } + return newProps; +} +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + baseProps = assign({}, baseProps); + Component = Component.defaultProps; + for (var propName in Component) + void 0 === baseProps[propName] && + (baseProps[propName] = Component[propName]); + return baseProps; + } + return baseProps; +} var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { @@ -5698,7 +5712,12 @@ function updateClassComponent( (nextProps = !0); else if (null === current) { var instance = workInProgress.stateNode, - oldProps = workInProgress.memoizedProps; + unresolvedOldProps = workInProgress.memoizedProps, + oldProps = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context, contextType = Component.contextType; @@ -5712,10 +5731,11 @@ function updateClassComponent( hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; hasNewLifecycles || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== nextProps || oldContext !== contextType) && + ((unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( workInProgress, instance, @@ -5728,7 +5748,7 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; - oldProps !== nextProps || + unresolvedOldProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate @@ -5775,13 +5795,14 @@ function updateClassComponent( instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); oldProps = workInProgress.memoizedProps; - contextType = + contextType = resolveClassComponentProps( + Component, + oldProps, workInProgress.type === workInProgress.elementType - ? oldProps - : resolveDefaultProps(workInProgress.type, oldProps); + ); instance.props = contextType; hasNewLifecycles = workInProgress.pendingProps; - oldState = instance.context; + unresolvedOldProps = instance.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -5789,13 +5810,13 @@ function updateClassComponent( ? previousContext : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); - var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; + oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = - "function" === typeof getDerivedStateFromProps$jscomp$0 || + "function" === typeof oldState || "function" === typeof instance.getSnapshotBeforeUpdate) || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || oldState !== oldContext) && + ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, instance, @@ -5803,20 +5824,20 @@ function updateClassComponent( oldContext )); hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - instance.state = oldState; + unresolvedOldProps = workInProgress.memoizedState; + instance.state = unresolvedOldProps; processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || + unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && + ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, Component, - getDerivedStateFromProps$jscomp$0, + oldState, nextProps ), (newState = workInProgress.memoizedState)), @@ -5827,7 +5848,7 @@ function updateClassComponent( Component, contextType, nextProps, - oldState, + unresolvedOldProps, newState, oldContext ) || @@ -5849,11 +5870,11 @@ function updateClassComponent( (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), @@ -5863,11 +5884,11 @@ function updateClassComponent( (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } @@ -6548,57 +6569,61 @@ function beginWork(current, workInProgress, renderLanes) { var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var init = elementType._init; - elementType = init(elementType._payload); - workInProgress.type = elementType; - current = resolveDefaultProps(elementType, current); - if ("function" === typeof elementType) - shouldConstruct(elementType) - ? ((workInProgress.tag = 1), + var props = workInProgress.pendingProps; + current = elementType._init; + current = current(elementType._payload); + workInProgress.type = current; + if ("function" === typeof current) + shouldConstruct(current) + ? ((props = resolveClassComponentProps(current, props, !1)), + (workInProgress.tag = 1), (workInProgress = updateClassComponent( null, workInProgress, - elementType, current, + props, renderLanes ))) - : ((workInProgress.tag = 0), + : ((props = resolveDefaultProps(current, props)), + (workInProgress.tag = 0), (workInProgress = updateFunctionComponent( null, workInProgress, - elementType, current, + props, renderLanes ))); else { - if (void 0 !== elementType && null !== elementType) + if (void 0 !== current && null !== current) if ( - ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ((elementType = current.$$typeof), + elementType === REACT_FORWARD_REF_TYPE) ) { + props = resolveDefaultProps(current, props); workInProgress.tag = 11; workInProgress = updateForwardRef( null, workInProgress, - elementType, current, + props, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { + } else if (elementType === REACT_MEMO_TYPE) { + props = resolveDefaultProps(current, props); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, - elementType, - resolveDefaultProps(elementType.type, current), + current, + resolveDefaultProps(current.type, props), renderLanes ); break a; } throw Error( "Element type is invalid. Received a promise that resolves to: " + - elementType + + current + ". Lazy element type must resolve to a class or function." ); } @@ -6606,33 +6631,33 @@ function beginWork(current, workInProgress, renderLanes) { return workInProgress; case 0: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateFunctionComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); case 1: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), updateClassComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6641,34 +6666,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; - init = workInProgress.memoizedState; - elementType = init.element; + elementType = workInProgress.memoizedState; + props = elementType.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== init.cache && + nextCache !== elementType.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - init = nextProps.element; - init === elementType + elementType = nextProps.element; + elementType === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, init, renderLanes), + : (reconcileChildren(current, workInProgress, elementType, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - elementType = workInProgress.pendingProps.children; + props = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - init = renderWithHooks( + elementType = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6676,10 +6701,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue = init; + HostTransitionContext._currentValue = elementType; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== init && + current.memoizedState.memoizedState !== elementType && propagateContextChange( workInProgress, HostTransitionContext, @@ -6687,7 +6712,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; case 6: return null; @@ -6699,35 +6724,30 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (elementType = workInProgress.pendingProps), + (props = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - elementType, + props, renderLanes )) - : reconcileChildren( - current, - workInProgress, - elementType, - renderLanes - ), + : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 11: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateForwardRef( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6763,17 +6783,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - elementType = enableRenderableContext + props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - init = workInProgress.pendingProps; + elementType = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); + nextCache = elementType.value; + pushProvider(workInProgress, props, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === init.children && + nextProps.children === elementType.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -6783,35 +6803,39 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); + } else propagateContextChange(workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (init = enableRenderableContext + (elementType = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (elementType = workInProgress.pendingProps.children), + (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (init = readContext(init)), - (elementType = elementType(init)), + (elementType = readContext(elementType)), + (props = props(elementType)), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 14: return ( - (elementType = workInProgress.type), - (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), - (init = resolveDefaultProps(elementType.type, init)), + (props = workInProgress.type), + (elementType = resolveDefaultProps(props, workInProgress.pendingProps)), + (elementType = resolveDefaultProps(props.type, elementType)), updateMemoComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6825,24 +6849,24 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(elementType) + isContextProvider(props) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, elementType, init), - mountClassInstance(workInProgress, elementType, init, renderLanes), + constructClassInstance(workInProgress, props, elementType), + mountClassInstance(workInProgress, props, elementType, renderLanes), finishClassComponent( null, workInProgress, - elementType, + props, !0, current, renderLanes @@ -6850,19 +6874,19 @@ function beginWork(current, workInProgress, renderLanes) { ); case 28: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 0), updateFunctionComponent( null, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6873,39 +6897,40 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(CacheContext)), + (props = readContext(CacheContext)), null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), + ? ((elementType = peekCacheFromPool()), + null === elementType && + ((elementType = workInProgressRoot), (nextProps = createCache()), - (init.pooledCache = nextProps), + (elementType.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), + null !== nextProps && + (elementType.pooledCacheLanes |= renderLanes), + (elementType = nextProps)), (workInProgress.memoizedState = { - parent: elementType, - cache: init + parent: props, + cache: elementType }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) + pushProvider(workInProgress, CacheContext, elementType)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), + (elementType = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== elementType - ? ((init = { parent: elementType, cache: elementType }), - (workInProgress.memoizedState = init), + elementType.parent !== props + ? ((elementType = { parent: props, cache: props }), + (workInProgress.memoizedState = elementType), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, elementType)) - : ((elementType = nextProps.cache), - pushProvider(workInProgress, CacheContext, elementType), - elementType !== init.cache && + elementType), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== elementType.cache && propagateContextChange( workInProgress, CacheContext, @@ -7154,14 +7179,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$75 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), + for (var lastTailNode$78 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$78 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$75 + null === lastTailNode$78 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$75.sibling = null); + : (lastTailNode$78.sibling = null); } } function bubbleProperties(completedWork) { @@ -7171,19 +7196,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags & 31457280), - (subtreeFlags |= child$76.flags & 31457280), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (var child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags & 31457280), + (subtreeFlags |= child$79.flags & 31457280), + (child$79.return = completedWork), + (child$79 = child$79.sibling); else - for (child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags), - (subtreeFlags |= child$76.flags), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (child$79 = completedWork.child; null !== child$79; ) + (newChildLanes |= child$79.lanes | child$79.childLanes), + (subtreeFlags |= child$79.subtreeFlags), + (subtreeFlags |= child$79.flags), + (child$79.return = completedWork), + (child$79 = child$79.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7650,6 +7675,15 @@ var offscreenSubtreeIsHidden = !1, offscreenSubtreeWasHidden = !1, PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set, nextEffect = null; +function callComponentWillUnmountWithTimer(current, instance) { + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); + instance.state = current.memoizedState; + instance.componentWillUnmount(); +} function safelyAttachRef(current, nearestMountedAncestor) { try { var ref = current.ref; @@ -7689,8 +7723,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$98) { - captureCommitPhaseError(current, nearestMountedAncestor, error$98); + } catch (error$101) { + captureCommitPhaseError(current, nearestMountedAncestor, error$101); } else ref.current = null; } @@ -7724,13 +7758,14 @@ function commitBeforeMutationEffects(root, firstChild) { break; case 1: if (0 !== (flags & 1024) && null !== current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState, + var prevState = current.memoizedState, instance = root.stateNode, snapshot = instance.getSnapshotBeforeUpdate( - root.elementType === root.type - ? prevProps - : resolveDefaultProps(root.type, prevProps), + resolveClassComponentProps( + root.type, + current.memoizedProps, + root.elementType === root.type + ), prevState ); instance.__reactInternalSnapshotBeforeUpdate = snapshot; @@ -7794,10 +7829,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$99 = effect.create, + var create$102 = effect.create, inst = effect.inst; - create$99 = create$99(); - inst.destroy = create$99; + create$102 = create$102(); + inst.destroy = create$102; } effect = effect.next; } while (effect !== finishedWork); @@ -7840,10 +7875,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { captureCommitPhaseError(finishedWork, finishedWork.return, error); } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); current = current.memoizedState; try { finishedRoot.componentDidUpdate( @@ -7851,11 +7887,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$103) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$103 ); } } @@ -8176,9 +8212,7 @@ function commitDeletionEffectsOnFiber( "function" === typeof prevHostParent.componentWillUnmount) ) try { - (prevHostParent.props = deletedFiber.memoizedProps), - (prevHostParent.state = deletedFiber.memoizedState), - prevHostParent.componentWillUnmount(); + callComponentWillUnmountWithTimer(deletedFiber, prevHostParent); } catch (error) { captureCommitPhaseError(deletedFiber, nearestMountedAncestor, error); } @@ -8318,8 +8352,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$111) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$111); } } break; @@ -8366,8 +8400,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { viewConfig.uiViewClassName, updatePayload ); - } catch (error$111) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$111); + } catch (error$114) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$114); } } break; @@ -8387,8 +8421,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { "RCTRawText", { text: current } ); - } catch (error$112) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$112); + } catch (error$115) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$115); } } break; @@ -8500,11 +8534,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { throw Error("Not yet implemented."); - } catch (error$102) { + } catch (error$105) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$102 + error$105 ); } } else if ( @@ -8578,12 +8612,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$103 = JSCompiler_inline_result.stateNode.containerInfo, - before$104 = getHostSibling(finishedWork); + var parent$106 = JSCompiler_inline_result.stateNode.containerInfo, + before$107 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$104, - parent$103 + before$107, + parent$106 ); break; default: @@ -8622,10 +8656,7 @@ function recursivelyTraverseDisappearLayoutEffects(parentFiber) { var current = finishedWork, nearestMountedAncestor = finishedWork.return; try { - var current$jscomp$0 = current; - instance.props = current$jscomp$0.memoizedProps; - instance.state = current$jscomp$0.memoizedState; - instance.componentWillUnmount(); + callComponentWillUnmountWithTimer(current, instance); } catch (error) { captureCommitPhaseError(current, nearestMountedAncestor, error); } @@ -9701,8 +9732,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$120) { - handleThrow(root, thrownValue$120); + } catch (thrownValue$123) { + handleThrow(root, thrownValue$123); } while (1); lanes && root.shellSuspendCounter++; @@ -9810,8 +9841,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$122) { - handleThrow(root, thrownValue$122); + } catch (thrownValue$125) { + handleThrow(root, thrownValue$125); } while (1); resetContextDependencies(); @@ -10823,10 +10854,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1159 = { + devToolsConfig$jscomp$inline_1168 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-e621cb36", + version: "19.0.0-canary-1766b206", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10842,11 +10873,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1407 = { - bundleType: devToolsConfig$jscomp$inline_1159.bundleType, - version: devToolsConfig$jscomp$inline_1159.version, - rendererPackageName: devToolsConfig$jscomp$inline_1159.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1159.rendererConfig, +var internals$jscomp$inline_1415 = { + bundleType: devToolsConfig$jscomp$inline_1168.bundleType, + version: devToolsConfig$jscomp$inline_1168.version, + rendererPackageName: devToolsConfig$jscomp$inline_1168.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1168.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10862,26 +10893,26 @@ var internals$jscomp$inline_1407 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1159.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1168.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-e621cb36" + reconcilerVersion: "19.0.0-canary-1766b206" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1408 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1416 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1408.isDisabled && - hook$jscomp$inline_1408.supportsFiber + !hook$jscomp$inline_1416.isDisabled && + hook$jscomp$inline_1416.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1408.inject( - internals$jscomp$inline_1407 + (rendererID = hook$jscomp$inline_1416.inject( + internals$jscomp$inline_1415 )), - (injectedHook = hook$jscomp$inline_1408); + (injectedHook = hook$jscomp$inline_1416); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index d933c16138b40..f79023050994d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_271 = { +var injectedNamesToPlugins$jscomp$inline_274 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_271 = { } } }, - isOrderingDirty$jscomp$inline_272 = !1, - pluginName$jscomp$inline_273; -for (pluginName$jscomp$inline_273 in injectedNamesToPlugins$jscomp$inline_271) + isOrderingDirty$jscomp$inline_275 = !1, + pluginName$jscomp$inline_276; +for (pluginName$jscomp$inline_276 in injectedNamesToPlugins$jscomp$inline_274) if ( - injectedNamesToPlugins$jscomp$inline_271.hasOwnProperty( - pluginName$jscomp$inline_273 + injectedNamesToPlugins$jscomp$inline_274.hasOwnProperty( + pluginName$jscomp$inline_276 ) ) { - var pluginModule$jscomp$inline_274 = - injectedNamesToPlugins$jscomp$inline_271[pluginName$jscomp$inline_273]; + var pluginModule$jscomp$inline_277 = + injectedNamesToPlugins$jscomp$inline_274[pluginName$jscomp$inline_276]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_273) || - namesToPlugins[pluginName$jscomp$inline_273] !== - pluginModule$jscomp$inline_274 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_276) || + namesToPlugins[pluginName$jscomp$inline_276] !== + pluginModule$jscomp$inline_277 ) { - if (namesToPlugins[pluginName$jscomp$inline_273]) + if (namesToPlugins[pluginName$jscomp$inline_276]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_273 + "`.") + (pluginName$jscomp$inline_276 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_273] = - pluginModule$jscomp$inline_274; - isOrderingDirty$jscomp$inline_272 = !0; + namesToPlugins[pluginName$jscomp$inline_276] = + pluginModule$jscomp$inline_277; + isOrderingDirty$jscomp$inline_275 = !0; } } -isOrderingDirty$jscomp$inline_272 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_275 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -5169,17 +5169,6 @@ function transferActualDuration(fiber) { for (var child = fiber.child; child; ) (fiber.actualDuration += child.actualDuration), (child = child.sibling); } -function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - baseProps = assign({}, baseProps); - Component = Component.defaultProps; - for (var propName in Component) - void 0 === baseProps[propName] && - (baseProps[propName] = Component[propName]); - return baseProps; - } - return baseProps; -} function applyDerivedStateFromProps( workInProgress, ctor, @@ -5334,6 +5323,31 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { "function" === typeof instance.componentDidMount && (workInProgress.flags |= 4194308); } +function resolveClassComponentProps( + Component, + baseProps, + alreadyResolvedDefaultProps +) { + var newProps = baseProps; + if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { + newProps = assign({}, newProps, baseProps); + for (var propName in Component) + void 0 === newProps[propName] && + (newProps[propName] = Component[propName]); + } + return newProps; +} +function resolveDefaultProps(Component, baseProps) { + if (Component && Component.defaultProps) { + baseProps = assign({}, baseProps); + Component = Component.defaultProps; + for (var propName in Component) + void 0 === baseProps[propName] && + (baseProps[propName] = Component[propName]); + return baseProps; + } + return baseProps; +} var CapturedStacks = new WeakMap(); function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { @@ -5897,7 +5911,12 @@ function updateClassComponent( (nextProps = !0); else if (null === current) { var instance = workInProgress.stateNode, - oldProps = workInProgress.memoizedProps; + unresolvedOldProps = workInProgress.memoizedProps, + oldProps = resolveClassComponentProps( + Component, + unresolvedOldProps, + workInProgress.type === workInProgress.elementType + ); instance.props = oldProps; var oldContext = instance.context, contextType = Component.contextType; @@ -5911,10 +5930,11 @@ function updateClassComponent( hasNewLifecycles = "function" === typeof getDerivedStateFromProps || "function" === typeof instance.getSnapshotBeforeUpdate; + unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps; hasNewLifecycles || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== nextProps || oldContext !== contextType) && + ((unresolvedOldProps || oldContext !== contextType) && callComponentWillReceiveProps( workInProgress, instance, @@ -5927,7 +5947,7 @@ function updateClassComponent( processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); oldContext = workInProgress.memoizedState; - oldProps !== nextProps || + unresolvedOldProps || oldState !== oldContext || didPerformWorkStackCursor.current || hasForceUpdate @@ -5974,13 +5994,14 @@ function updateClassComponent( instance = workInProgress.stateNode; cloneUpdateQueue(current, workInProgress); oldProps = workInProgress.memoizedProps; - contextType = + contextType = resolveClassComponentProps( + Component, + oldProps, workInProgress.type === workInProgress.elementType - ? oldProps - : resolveDefaultProps(workInProgress.type, oldProps); + ); instance.props = contextType; hasNewLifecycles = workInProgress.pendingProps; - oldState = instance.context; + unresolvedOldProps = instance.context; oldContext = Component.contextType; "object" === typeof oldContext && null !== oldContext ? (oldContext = readContext(oldContext)) @@ -5988,13 +6009,13 @@ function updateClassComponent( ? previousContext : contextStackCursor$1.current), (oldContext = getMaskedContext(workInProgress, oldContext))); - var getDerivedStateFromProps$jscomp$0 = Component.getDerivedStateFromProps; + oldState = Component.getDerivedStateFromProps; (getDerivedStateFromProps = - "function" === typeof getDerivedStateFromProps$jscomp$0 || + "function" === typeof oldState || "function" === typeof instance.getSnapshotBeforeUpdate) || ("function" !== typeof instance.UNSAFE_componentWillReceiveProps && "function" !== typeof instance.componentWillReceiveProps) || - ((oldProps !== hasNewLifecycles || oldState !== oldContext) && + ((oldProps !== hasNewLifecycles || unresolvedOldProps !== oldContext) && callComponentWillReceiveProps( workInProgress, instance, @@ -6002,20 +6023,20 @@ function updateClassComponent( oldContext )); hasForceUpdate = !1; - oldState = workInProgress.memoizedState; - instance.state = oldState; + unresolvedOldProps = workInProgress.memoizedState; + instance.state = unresolvedOldProps; processUpdateQueue(workInProgress, nextProps, instance, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); var newState = workInProgress.memoizedState; oldProps !== hasNewLifecycles || - oldState !== newState || + unresolvedOldProps !== newState || didPerformWorkStackCursor.current || hasForceUpdate - ? ("function" === typeof getDerivedStateFromProps$jscomp$0 && + ? ("function" === typeof oldState && (applyDerivedStateFromProps( workInProgress, Component, - getDerivedStateFromProps$jscomp$0, + oldState, nextProps ), (newState = workInProgress.memoizedState)), @@ -6026,7 +6047,7 @@ function updateClassComponent( Component, contextType, nextProps, - oldState, + unresolvedOldProps, newState, oldContext ) || @@ -6048,11 +6069,11 @@ function updateClassComponent( (workInProgress.flags |= 1024)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (workInProgress.memoizedProps = nextProps), (workInProgress.memoizedState = newState)), @@ -6062,11 +6083,11 @@ function updateClassComponent( (nextProps = contextType)) : ("function" !== typeof instance.componentDidUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 4), "function" !== typeof instance.getSnapshotBeforeUpdate || (oldProps === current.memoizedProps && - oldState === current.memoizedState) || + unresolvedOldProps === current.memoizedState) || (workInProgress.flags |= 1024), (nextProps = !1)); } @@ -6772,57 +6793,61 @@ function beginWork(current, workInProgress, renderLanes) { var elementType = workInProgress.elementType; a: { resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); - current = workInProgress.pendingProps; - var init = elementType._init; - elementType = init(elementType._payload); - workInProgress.type = elementType; - current = resolveDefaultProps(elementType, current); - if ("function" === typeof elementType) - shouldConstruct(elementType) - ? ((workInProgress.tag = 1), + var props = workInProgress.pendingProps; + current = elementType._init; + current = current(elementType._payload); + workInProgress.type = current; + if ("function" === typeof current) + shouldConstruct(current) + ? ((props = resolveClassComponentProps(current, props, !1)), + (workInProgress.tag = 1), (workInProgress = updateClassComponent( null, workInProgress, - elementType, current, + props, renderLanes ))) - : ((workInProgress.tag = 0), + : ((props = resolveDefaultProps(current, props)), + (workInProgress.tag = 0), (workInProgress = updateFunctionComponent( null, workInProgress, - elementType, current, + props, renderLanes ))); else { - if (void 0 !== elementType && null !== elementType) + if (void 0 !== current && null !== current) if ( - ((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE) + ((elementType = current.$$typeof), + elementType === REACT_FORWARD_REF_TYPE) ) { + props = resolveDefaultProps(current, props); workInProgress.tag = 11; workInProgress = updateForwardRef( null, workInProgress, - elementType, current, + props, renderLanes ); break a; - } else if (init === REACT_MEMO_TYPE) { + } else if (elementType === REACT_MEMO_TYPE) { + props = resolveDefaultProps(current, props); workInProgress.tag = 14; workInProgress = updateMemoComponent( null, workInProgress, - elementType, - resolveDefaultProps(elementType.type, current), + current, + resolveDefaultProps(current.type, props), renderLanes ); break a; } throw Error( "Element type is invalid. Received a promise that resolves to: " + - elementType + + current + ". Lazy element type must resolve to a class or function." ); } @@ -6830,33 +6855,33 @@ function beginWork(current, workInProgress, renderLanes) { return workInProgress; case 0: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateFunctionComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); case 1: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), updateClassComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6865,34 +6890,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; - init = workInProgress.memoizedState; - elementType = init.element; + elementType = workInProgress.memoizedState; + props = elementType.element; cloneUpdateQueue(current, workInProgress); processUpdateQueue(workInProgress, nextProps, null, renderLanes); nextProps = workInProgress.memoizedState; var nextCache = nextProps.cache; pushProvider(workInProgress, CacheContext, nextCache); - nextCache !== init.cache && + nextCache !== elementType.cache && propagateContextChange(workInProgress, CacheContext, renderLanes); suspendIfUpdateReadFromEntangledAsyncAction(); - init = nextProps.element; - init === elementType + elementType = nextProps.element; + elementType === props ? (workInProgress = bailoutOnAlreadyFinishedWork( current, workInProgress, renderLanes )) - : (reconcileChildren(current, workInProgress, init, renderLanes), + : (reconcileChildren(current, workInProgress, elementType, renderLanes), (workInProgress = workInProgress.child)); return workInProgress; case 26: case 27: case 5: pushHostContext(workInProgress); - elementType = workInProgress.pendingProps.children; + props = workInProgress.pendingProps.children; if (enableAsyncActions && null !== workInProgress.memoizedState) { if (!enableAsyncActions) throw Error("Not implemented."); - init = renderWithHooks( + elementType = renderWithHooks( current, workInProgress, TransitionAwareHostComponent, @@ -6900,10 +6925,10 @@ function beginWork(current, workInProgress, renderLanes) { null, renderLanes ); - HostTransitionContext._currentValue = init; + HostTransitionContext._currentValue = elementType; didReceiveUpdate && null !== current && - current.memoizedState.memoizedState !== init && + current.memoizedState.memoizedState !== elementType && propagateContextChange( workInProgress, HostTransitionContext, @@ -6911,7 +6936,7 @@ function beginWork(current, workInProgress, renderLanes) { ); } markRef(current, workInProgress); - reconcileChildren(current, workInProgress, elementType, renderLanes); + reconcileChildren(current, workInProgress, props, renderLanes); return workInProgress.child; case 6: return null; @@ -6923,35 +6948,30 @@ function beginWork(current, workInProgress, renderLanes) { workInProgress, workInProgress.stateNode.containerInfo ), - (elementType = workInProgress.pendingProps), + (props = workInProgress.pendingProps), null === current ? (workInProgress.child = reconcileChildFibers( workInProgress, null, - elementType, + props, renderLanes )) - : reconcileChildren( - current, - workInProgress, - elementType, - renderLanes - ), + : reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 11: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = workInProgress.pendingProps), + (elementType = + workInProgress.elementType === props + ? elementType + : resolveDefaultProps(props, elementType)), updateForwardRef( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -6978,9 +6998,9 @@ function beginWork(current, workInProgress, renderLanes) { case 12: return ( (workInProgress.flags |= 4), - (elementType = workInProgress.stateNode), - (elementType.effectDuration = 0), - (elementType.passiveEffectDuration = 0), + (props = workInProgress.stateNode), + (props.effectDuration = 0), + (props.passiveEffectDuration = 0), reconcileChildren( current, workInProgress, @@ -6991,17 +7011,17 @@ function beginWork(current, workInProgress, renderLanes) { ); case 10: a: { - elementType = enableRenderableContext + props = enableRenderableContext ? workInProgress.type : workInProgress.type._context; - init = workInProgress.pendingProps; + elementType = workInProgress.pendingProps; nextProps = workInProgress.memoizedProps; - nextCache = init.value; - pushProvider(workInProgress, elementType, nextCache); + nextCache = elementType.value; + pushProvider(workInProgress, props, nextCache); if (null !== nextProps) if (objectIs(nextProps.value, nextCache)) { if ( - nextProps.children === init.children && + nextProps.children === elementType.children && !didPerformWorkStackCursor.current ) { workInProgress = bailoutOnAlreadyFinishedWork( @@ -7011,37 +7031,41 @@ function beginWork(current, workInProgress, renderLanes) { ); break a; } - } else - propagateContextChange(workInProgress, elementType, renderLanes); - reconcileChildren(current, workInProgress, init.children, renderLanes); + } else propagateContextChange(workInProgress, props, renderLanes); + reconcileChildren( + current, + workInProgress, + elementType.children, + renderLanes + ); workInProgress = workInProgress.child; } return workInProgress; case 9: return ( - (init = enableRenderableContext + (elementType = enableRenderableContext ? workInProgress.type._context : workInProgress.type), - (elementType = workInProgress.pendingProps.children), + (props = workInProgress.pendingProps.children), prepareToReadContext(workInProgress, renderLanes), - (init = readContext(init)), + (elementType = readContext(elementType)), markComponentRenderStarted(workInProgress), - (elementType = elementType(init)), + (props = props(elementType)), markComponentRenderStopped(), (workInProgress.flags |= 1), - reconcileChildren(current, workInProgress, elementType, renderLanes), + reconcileChildren(current, workInProgress, props, renderLanes), workInProgress.child ); case 14: return ( - (elementType = workInProgress.type), - (init = resolveDefaultProps(elementType, workInProgress.pendingProps)), - (init = resolveDefaultProps(elementType.type, init)), + (props = workInProgress.type), + (elementType = resolveDefaultProps(props, workInProgress.pendingProps)), + (elementType = resolveDefaultProps(props.type, elementType)), updateMemoComponent( current, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -7055,24 +7079,24 @@ function beginWork(current, workInProgress, renderLanes) { ); case 17: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 1), - isContextProvider(elementType) + isContextProvider(props) ? ((current = !0), pushContextProvider(workInProgress)) : (current = !1), prepareToReadContext(workInProgress, renderLanes), - constructClassInstance(workInProgress, elementType, init), - mountClassInstance(workInProgress, elementType, init, renderLanes), + constructClassInstance(workInProgress, props, elementType), + mountClassInstance(workInProgress, props, elementType, renderLanes), finishClassComponent( null, workInProgress, - elementType, + props, !0, current, renderLanes @@ -7080,19 +7104,19 @@ function beginWork(current, workInProgress, renderLanes) { ); case 28: return ( - (elementType = workInProgress.type), - (init = workInProgress.pendingProps), - (init = - workInProgress.elementType === elementType - ? init - : resolveDefaultProps(elementType, init)), + (props = workInProgress.type), + (elementType = resolveClassComponentProps( + props, + workInProgress.pendingProps, + workInProgress.elementType === props + )), resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress), (workInProgress.tag = 0), updateFunctionComponent( null, workInProgress, + props, elementType, - init, renderLanes ) ); @@ -7103,39 +7127,40 @@ function beginWork(current, workInProgress, renderLanes) { case 24: return ( prepareToReadContext(workInProgress, renderLanes), - (elementType = readContext(CacheContext)), + (props = readContext(CacheContext)), null === current - ? ((init = peekCacheFromPool()), - null === init && - ((init = workInProgressRoot), + ? ((elementType = peekCacheFromPool()), + null === elementType && + ((elementType = workInProgressRoot), (nextProps = createCache()), - (init.pooledCache = nextProps), + (elementType.pooledCache = nextProps), nextProps.refCount++, - null !== nextProps && (init.pooledCacheLanes |= renderLanes), - (init = nextProps)), + null !== nextProps && + (elementType.pooledCacheLanes |= renderLanes), + (elementType = nextProps)), (workInProgress.memoizedState = { - parent: elementType, - cache: init + parent: props, + cache: elementType }), initializeUpdateQueue(workInProgress), - pushProvider(workInProgress, CacheContext, init)) + pushProvider(workInProgress, CacheContext, elementType)) : (0 !== (current.lanes & renderLanes) && (cloneUpdateQueue(current, workInProgress), processUpdateQueue(workInProgress, null, null, renderLanes), suspendIfUpdateReadFromEntangledAsyncAction()), - (init = current.memoizedState), + (elementType = current.memoizedState), (nextProps = workInProgress.memoizedState), - init.parent !== elementType - ? ((init = { parent: elementType, cache: elementType }), - (workInProgress.memoizedState = init), + elementType.parent !== props + ? ((elementType = { parent: props, cache: props }), + (workInProgress.memoizedState = elementType), 0 === workInProgress.lanes && (workInProgress.memoizedState = workInProgress.updateQueue.baseState = - init), - pushProvider(workInProgress, CacheContext, elementType)) - : ((elementType = nextProps.cache), - pushProvider(workInProgress, CacheContext, elementType), - elementType !== init.cache && + elementType), + pushProvider(workInProgress, CacheContext, props)) + : ((props = nextProps.cache), + pushProvider(workInProgress, CacheContext, props), + props !== elementType.cache && propagateContextChange( workInProgress, CacheContext, @@ -7384,14 +7409,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$79 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$79 = lastTailNode), + for (var lastTailNode$82 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$82 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$79 + null === lastTailNode$82 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$79.sibling = null); + : (lastTailNode$82.sibling = null); } } function bubbleProperties(completedWork) { @@ -7403,53 +7428,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$81 = completedWork.selfBaseDuration, - child$82 = completedWork.child; - null !== child$82; + var treeBaseDuration$84 = completedWork.selfBaseDuration, + child$85 = completedWork.child; + null !== child$85; ) - (newChildLanes |= child$82.lanes | child$82.childLanes), - (subtreeFlags |= child$82.subtreeFlags & 31457280), - (subtreeFlags |= child$82.flags & 31457280), - (treeBaseDuration$81 += child$82.treeBaseDuration), - (child$82 = child$82.sibling); - completedWork.treeBaseDuration = treeBaseDuration$81; + (newChildLanes |= child$85.lanes | child$85.childLanes), + (subtreeFlags |= child$85.subtreeFlags & 31457280), + (subtreeFlags |= child$85.flags & 31457280), + (treeBaseDuration$84 += child$85.treeBaseDuration), + (child$85 = child$85.sibling); + completedWork.treeBaseDuration = treeBaseDuration$84; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$84 = completedWork.child; + null !== treeBaseDuration$84; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$81.flags & 31457280), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$84.lanes | treeBaseDuration$84.childLanes), + (subtreeFlags |= treeBaseDuration$84.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$84.flags & 31457280), + (treeBaseDuration$84.return = completedWork), + (treeBaseDuration$84 = treeBaseDuration$84.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$81 = completedWork.actualDuration; - child$82 = completedWork.selfBaseDuration; + treeBaseDuration$84 = completedWork.actualDuration; + child$85 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$81 += child.actualDuration), - (child$82 += child.treeBaseDuration), + (treeBaseDuration$84 += child.actualDuration), + (child$85 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$81; - completedWork.treeBaseDuration = child$82; + completedWork.actualDuration = treeBaseDuration$84; + completedWork.treeBaseDuration = child$85; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$84 = completedWork.child; + null !== treeBaseDuration$84; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags), - (subtreeFlags |= treeBaseDuration$81.flags), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$84.lanes | treeBaseDuration$84.childLanes), + (subtreeFlags |= treeBaseDuration$84.subtreeFlags), + (subtreeFlags |= treeBaseDuration$84.flags), + (treeBaseDuration$84.return = completedWork), + (treeBaseDuration$84 = treeBaseDuration$84.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7946,7 +7971,11 @@ function shouldProfile(current) { return 0 !== (current.mode & 2) && 0 !== (executionContext & 4); } function callComponentWillUnmountWithTimer(current, instance) { - instance.props = current.memoizedProps; + instance.props = resolveClassComponentProps( + current.type, + current.memoizedProps, + current.elementType === current.type + ); instance.state = current.memoizedState; if (shouldProfile(current)) try { @@ -8013,8 +8042,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$107) { - captureCommitPhaseError(current, nearestMountedAncestor, error$107); + } catch (error$110) { + captureCommitPhaseError(current, nearestMountedAncestor, error$110); } else ref.current = null; } @@ -8048,13 +8077,14 @@ function commitBeforeMutationEffects(root, firstChild) { break; case 1: if (0 !== (flags & 1024) && null !== current) { - var prevProps = current.memoizedProps, - prevState = current.memoizedState, + var prevState = current.memoizedState, instance = root.stateNode, snapshot = instance.getSnapshotBeforeUpdate( - root.elementType === root.type - ? prevProps - : resolveDefaultProps(root.type, prevProps), + resolveClassComponentProps( + root.type, + current.memoizedProps, + root.elementType === root.type + ), prevState ); instance.__reactInternalSnapshotBeforeUpdate = snapshot; @@ -8147,10 +8177,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$108 = effect.create, + var create$111 = effect.create, inst = effect.inst; - create$108 = create$108(); - inst.destroy = create$108; + create$111 = create$111(); + inst.destroy = create$111; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -8178,8 +8208,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$110) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$110); + } catch (error$113) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$113); } } function commitClassCallbacks(finishedWork) { @@ -8259,18 +8289,19 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$111) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$114 ); } else { - var prevProps = + var prevProps = resolveClassComponentProps( + finishedWork.type, + current.memoizedProps, finishedWork.elementType === finishedWork.type - ? current.memoizedProps - : resolveDefaultProps(finishedWork.type, current.memoizedProps); + ); current = current.memoizedState; if (shouldProfile(finishedWork)) { try { @@ -8280,11 +8311,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$115 ); } recordLayoutEffectDuration(finishedWork); @@ -8295,11 +8326,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$113) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$116 ); } } @@ -8789,22 +8820,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$122) { + } catch (error$125) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$122 + error$125 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$123) { + } catch (error$126) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$123 + error$126 ); } } @@ -8852,8 +8883,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { viewConfig.uiViewClassName, updatePayload ); - } catch (error$126) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$126); + } catch (error$129) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$129); } } break; @@ -8873,8 +8904,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { "RCTRawText", { text: current } ); - } catch (error$127) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$127); + } catch (error$130) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$130); } } break; @@ -8986,11 +9017,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { throw Error("Not yet implemented."); - } catch (error$116) { + } catch (error$119) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$119 ); } } else if ( @@ -9064,12 +9095,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$117 = JSCompiler_inline_result.stateNode.containerInfo, - before$118 = getHostSibling(finishedWork); + var parent$120 = JSCompiler_inline_result.stateNode.containerInfo, + before$121 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$118, - parent$117 + before$121, + parent$120 ); break; default: @@ -9255,8 +9286,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$131) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$131); + } catch (error$134) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$134); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10273,8 +10304,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$136) { - handleThrow(root, thrownValue$136); + } catch (thrownValue$139) { + handleThrow(root, thrownValue$139); } while (1); lanes && root.shellSuspendCounter++; @@ -10393,8 +10424,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$138) { - handleThrow(root, thrownValue$138); + } catch (thrownValue$141) { + handleThrow(root, thrownValue$141); } while (1); resetContextDependencies(); @@ -10760,7 +10791,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$109 = commitTime, + commitTime$112 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -10768,7 +10799,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$109 + commitTime$112 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -11529,10 +11560,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1241 = { + devToolsConfig$jscomp$inline_1250 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-79f907d7", + version: "19.0.0-canary-efe6d77a", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11562,10 +11593,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1241.bundleType, - version: devToolsConfig$jscomp$inline_1241.version, - rendererPackageName: devToolsConfig$jscomp$inline_1241.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1241.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1250.bundleType, + version: devToolsConfig$jscomp$inline_1250.version, + rendererPackageName: devToolsConfig$jscomp$inline_1250.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1250.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11581,14 +11612,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1241.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1250.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-79f907d7" + reconcilerVersion: "19.0.0-canary-efe6d77a" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {