Move all markRef calls into begin phase (#28375)

Certain fiber types may have a ref attached to them. The main ones are
HostComponent and ClassComponent. During the render phase, we check if a
ref was passed to it, and if so, we schedule a Ref effect: `markRef`.

Currently, we're not consistent about whether we call `markRef` in the
begin phase or the complete phase. For some fiber types, I found that
`markRef` was called in both phases, causing redundant work.

After some investigation, I don't believe it's necessary to call
`markRef` in both the begin phase and the complete phase, as long as you
don't bail out before calling `markRef`.

I though that maybe it had to do with the
`attemptEarlyBailoutIfNoScheduledUpdates` branch, which is a fast path
that skips the regular begin phase if no new props, state, or context
were passed. But if the props haven't changed (referentially — the
`memo` and `shouldComponentUpdate` checks happen later), then it follows
that the ref couldn't have changed either. This is true even in the old
`createElement` runtime where `ref` is stored on the element instead of
as a prop, because there's no way to pass a new ref to an element
without also passing new props. You might argue this is a leaky
assumption, but since we're shifting ref to be just a regular prop
anyway, I think it's the correct way to think about it going forward.

I think the pattern of calling `markRef` in the complete phase may have
been left over from an earlier iteration of the implementation before
the bailout logic was structured like it is today.

So, I removed all the `markRef` calls from the complete phase. In the
case of ScopeComponent, which had no corresponding call in the begin
phase, I added one.

We already had a test that asserted that a ref is reattached even if the
component bails out, but I added some new ones to be extra safe.

The reason I'm changing this this is because I'm working on a different
change to move the ref handling logic in `coerceRef` to happen in render
phase of the component that accepts the ref, instead of during the
parent's reconciliation.

DiffTrain build for [c820097716](https://github.com/facebook/react/commit/c820097716c3d9765bf85bf58202a4975d99e450)
This commit is contained in:
acdlite
2024-02-20 02:11:26 +00:00
parent 3ff23f9234
commit 76bf9a9ff3
19 changed files with 315 additions and 581 deletions
+1 -1
View File
@@ -1 +1 @@
2e84e1629924e6cb278638305fa92040f6ef6eb5
c820097716c3d9765bf85bf58202a4975d99e450
+1 -1
View File
@@ -618,4 +618,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-3c4221fd";
exports.version = "18.3.0-www-classic-31ea3e04";
@@ -622,7 +622,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-7063c424";
exports.version = "18.3.0-www-classic-3f55cb15";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+12 -23
View File
@@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}
var ReactVersion = "18.3.0-www-classic-2901d413";
var ReactVersion = "18.3.0-www-classic-88364efd";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -14886,7 +14886,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
nextProps.mode === "hidden" ||
@@ -15244,7 +15244,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -15478,7 +15480,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -15708,7 +15710,7 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -17451,6 +17453,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -19283,10 +19286,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -19803,10 +19802,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -19840,11 +19835,6 @@ if (__DEV__) {
appendAllChildren(_instance3, workInProgress);
workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -20273,17 +20263,16 @@ if (__DEV__) {
prepareScopeUpdate();
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
+12 -23
View File
@@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}
var ReactVersion = "18.3.0-www-modern-827e818d";
var ReactVersion = "18.3.0-www-modern-eef60811";
var LegacyRoot = 0;
var ConcurrentRoot = 1;
@@ -14610,7 +14610,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
nextProps.mode === "hidden" ||
@@ -14968,7 +14968,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -15192,7 +15194,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -15402,7 +15404,7 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -17145,6 +17147,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -18971,10 +18974,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -19484,10 +19483,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -19521,11 +19516,6 @@ if (__DEV__) {
appendAllChildren(_instance3, workInProgress);
workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -19946,17 +19936,16 @@ if (__DEV__) {
prepareScopeUpdate();
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
+32 -42
View File
@@ -4492,7 +4492,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -4585,7 +4585,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -4863,7 +4863,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !didCaptureError)
return (
@@ -6166,9 +6166,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && (workInProgress.flags |= 4),
current.ref !== workInProgress.ref &&
(workInProgress.flags |= 2097664);
current.memoizedProps !== newProps && (workInProgress.flags |= 4);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -6226,7 +6224,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = renderLanes.sibling;
}
workInProgress.stateNode = current;
null !== workInProgress.ref && (workInProgress.flags |= 2097664);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -6398,19 +6395,15 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((workInProgress.stateNode = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode,
getChildContextValues: getChildContextValues
}),
shim$1(),
null !== workInProgress.ref &&
((workInProgress.flags |= 2097664), (workInProgress.flags |= 4)))
: (null !== workInProgress.ref && (workInProgress.flags |= 4),
current.ref !== workInProgress.ref &&
(workInProgress.flags |= 2097664)),
null === current &&
((workInProgress.stateNode = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode,
getChildContextValues: getChildContextValues
}),
shim$1()),
null !== workInProgress.ref && (workInProgress.flags |= 4),
bubbleProperties(workInProgress),
null
);
@@ -9796,7 +9789,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -9962,12 +9955,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -10587,19 +10577,19 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component),
devToolsConfig$jscomp$inline_1148 = {
devToolsConfig$jscomp$inline_1140 = {
findFiberByHostInstance: function () {
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-7ccd01b3",
version: "18.3.0-www-classic-9c4f8376",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1317 = {
bundleType: devToolsConfig$jscomp$inline_1148.bundleType,
version: devToolsConfig$jscomp$inline_1148.version,
rendererPackageName: devToolsConfig$jscomp$inline_1148.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1148.rendererConfig,
var internals$jscomp$inline_1320 = {
bundleType: devToolsConfig$jscomp$inline_1140.bundleType,
version: devToolsConfig$jscomp$inline_1140.version,
rendererPackageName: devToolsConfig$jscomp$inline_1140.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1140.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -10616,26 +10606,26 @@ var internals$jscomp$inline_1317 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1148.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1140.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-7ccd01b3"
reconcilerVersion: "18.3.0-www-classic-9c4f8376"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1318 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1321 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1318.isDisabled &&
hook$jscomp$inline_1318.supportsFiber
!hook$jscomp$inline_1321.isDisabled &&
hook$jscomp$inline_1321.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1318.inject(
internals$jscomp$inline_1317
(rendererID = hook$jscomp$inline_1321.inject(
internals$jscomp$inline_1320
)),
(injectedHook = hook$jscomp$inline_1318);
(injectedHook = hook$jscomp$inline_1321);
} catch (err) {}
}
var Path = Mode$1.Path;
+32 -42
View File
@@ -4273,7 +4273,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -4366,7 +4366,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -4628,7 +4628,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
hasContext = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !hasContext)
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
@@ -5905,9 +5905,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && (workInProgress.flags |= 4),
current.ref !== workInProgress.ref &&
(workInProgress.flags |= 2097664);
current.memoizedProps !== newProps && (workInProgress.flags |= 4);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -5965,7 +5963,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = renderLanes.sibling;
}
workInProgress.stateNode = current;
null !== workInProgress.ref && (workInProgress.flags |= 2097664);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -6133,19 +6130,15 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((workInProgress.stateNode = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode,
getChildContextValues: getChildContextValues
}),
shim$1(),
null !== workInProgress.ref &&
((workInProgress.flags |= 2097664), (workInProgress.flags |= 4)))
: (null !== workInProgress.ref && (workInProgress.flags |= 4),
current.ref !== workInProgress.ref &&
(workInProgress.flags |= 2097664)),
null === current &&
((workInProgress.stateNode = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode,
getChildContextValues: getChildContextValues
}),
shim$1()),
null !== workInProgress.ref && (workInProgress.flags |= 4),
bubbleProperties(workInProgress),
null
);
@@ -9511,7 +9504,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -9660,12 +9653,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -10242,19 +10232,19 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component),
devToolsConfig$jscomp$inline_1128 = {
devToolsConfig$jscomp$inline_1120 = {
findFiberByHostInstance: function () {
return null;
},
bundleType: 0,
version: "18.3.0-www-modern-a161c109",
version: "18.3.0-www-modern-3921cd31",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1297 = {
bundleType: devToolsConfig$jscomp$inline_1128.bundleType,
version: devToolsConfig$jscomp$inline_1128.version,
rendererPackageName: devToolsConfig$jscomp$inline_1128.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1128.rendererConfig,
var internals$jscomp$inline_1300 = {
bundleType: devToolsConfig$jscomp$inline_1120.bundleType,
version: devToolsConfig$jscomp$inline_1120.version,
rendererPackageName: devToolsConfig$jscomp$inline_1120.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1120.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@@ -10271,26 +10261,26 @@ var internals$jscomp$inline_1297 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1128.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1120.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-a161c109"
reconcilerVersion: "18.3.0-www-modern-3921cd31"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1298 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1301 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1298.isDisabled &&
hook$jscomp$inline_1298.supportsFiber
!hook$jscomp$inline_1301.isDisabled &&
hook$jscomp$inline_1301.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1298.inject(
internals$jscomp$inline_1297
(rendererID = hook$jscomp$inline_1301.inject(
internals$jscomp$inline_1300
)),
(injectedHook = hook$jscomp$inline_1298);
(injectedHook = hook$jscomp$inline_1301);
} catch (err) {}
}
var Path = Mode$1.Path;
+14 -42
View File
@@ -19764,7 +19764,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
nextProps.mode === "hidden" ||
@@ -20122,7 +20122,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -20367,7 +20369,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -20693,13 +20695,13 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateHostHoistable(current, workInProgress, renderLanes) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var currentProps = current === null ? null : current.memoizedProps;
var resource = (workInProgress.memoizedState = getResource(
workInProgress.type,
@@ -20750,7 +20752,7 @@ if (__DEV__) {
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
return workInProgress.child;
}
@@ -22584,6 +22586,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -24436,10 +24439,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -25012,10 +25011,6 @@ if (__DEV__) {
// phase if we are not hydrating.
markUpdate(workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -25039,10 +25034,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -25091,10 +25082,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25134,11 +25121,6 @@ if (__DEV__) {
workInProgress.stateNode = instance;
markUpdate(workInProgress);
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -25152,10 +25134,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25201,11 +25179,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -25643,17 +25616,16 @@ if (__DEV__) {
prepareScopeUpdate(scopeInstance, workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -35900,7 +35872,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-www-classic-c96a8652";
var ReactVersion = "18.3.0-www-classic-efb619e9";
function createPortal$1(
children,
+14 -42
View File
@@ -19674,7 +19674,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
nextProps.mode === "hidden" ||
@@ -20032,7 +20032,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -20267,7 +20269,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -20573,13 +20575,13 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateHostHoistable(current, workInProgress, renderLanes) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var currentProps = current === null ? null : current.memoizedProps;
var resource = (workInProgress.memoizedState = getResource(
workInProgress.type,
@@ -20630,7 +20632,7 @@ if (__DEV__) {
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
return workInProgress.child;
}
@@ -22464,6 +22466,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -24310,10 +24313,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -24879,10 +24878,6 @@ if (__DEV__) {
// phase if we are not hydrating.
markUpdate(workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -24906,10 +24901,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -24958,10 +24949,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25001,11 +24988,6 @@ if (__DEV__) {
workInProgress.stateNode = instance;
markUpdate(workInProgress);
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -25019,10 +25001,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25068,11 +25046,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -25502,17 +25475,16 @@ if (__DEV__) {
prepareScopeUpdate(scopeInstance, workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -35736,7 +35708,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-www-modern-69431358";
var ReactVersion = "18.3.0-www-modern-3cf273ca";
function createPortal$1(
children,
+24 -39
View File
@@ -5402,7 +5402,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -5495,7 +5495,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -5777,7 +5777,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !didCaptureError)
return (
@@ -7044,9 +7044,6 @@ function getChildContextValues(context) {
function markUpdate(workInProgress) {
workInProgress.flags |= 4;
}
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
workInProgress.flags &= -16777217;
@@ -7183,7 +7180,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = workInProgress.memoizedState;
if (null === current)
markUpdate(workInProgress),
null !== workInProgress.ref && markRef(workInProgress),
null !== renderLanes
? (bubbleProperties(workInProgress),
preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
@@ -7192,7 +7188,6 @@ function completeWork(current, workInProgress, renderLanes) {
else {
var currentResource = current.memoizedState;
renderLanes !== currentResource && markUpdate(workInProgress);
current.ref !== workInProgress.ref && markRef(workInProgress);
null !== renderLanes
? (bubbleProperties(workInProgress),
renderLanes === currentResource
@@ -7208,8 +7203,7 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = rootInstanceStackCursor.current;
currentResource = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7233,7 +7227,6 @@ function completeWork(current, workInProgress, renderLanes) {
)),
(workInProgress.stateNode = current),
markUpdate(workInProgress));
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
return null;
@@ -7241,8 +7234,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7363,7 +7355,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
current && markUpdate(workInProgress);
}
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -7592,19 +7583,16 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress),
null !== workInProgress.ref &&
(markRef(workInProgress), markUpdate(workInProgress)))
: (null !== workInProgress.ref && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress)),
null === current &&
((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress)),
null !== workInProgress.ref && markUpdate(workInProgress),
bubbleProperties(workInProgress),
null
);
@@ -11618,7 +11606,7 @@ beginWork = function (current, workInProgress, renderLanes) {
return workInProgress;
case 26:
return (
markRef$1(current, workInProgress),
markRef(current, workInProgress),
(renderLanes = workInProgress.memoizedState =
getResource(
workInProgress.type,
@@ -11663,7 +11651,7 @@ beginWork = function (current, workInProgress, renderLanes) {
Component,
renderLanes
)),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
workInProgress.child
);
case 5:
@@ -11721,7 +11709,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -11915,12 +11903,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -17179,7 +17164,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1819 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-b990b268",
version: "18.3.0-www-classic-b7d10b3e",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2179 = {
@@ -17209,7 +17194,7 @@ var internals$jscomp$inline_2179 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-b990b268"
reconcilerVersion: "18.3.0-www-classic-b7d10b3e"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2180 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17552,4 +17537,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-classic-b990b268";
exports.version = "18.3.0-www-classic-b7d10b3e";
+24 -39
View File
@@ -5270,7 +5270,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -5363,7 +5363,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -5629,7 +5629,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
hasContext = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !hasContext)
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
@@ -6876,9 +6876,6 @@ function getChildContextValues(context) {
function markUpdate(workInProgress) {
workInProgress.flags |= 4;
}
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
workInProgress.flags &= -16777217;
@@ -7009,7 +7006,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = workInProgress.memoizedState;
if (null === current)
markUpdate(workInProgress),
null !== workInProgress.ref && markRef(workInProgress),
null !== renderLanes
? (bubbleProperties(workInProgress),
preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
@@ -7018,7 +7014,6 @@ function completeWork(current, workInProgress, renderLanes) {
else {
var currentResource = current.memoizedState;
renderLanes !== currentResource && markUpdate(workInProgress);
current.ref !== workInProgress.ref && markRef(workInProgress);
null !== renderLanes
? (bubbleProperties(workInProgress),
renderLanes === currentResource
@@ -7034,8 +7029,7 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = rootInstanceStackCursor.current;
currentResource = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7059,7 +7053,6 @@ function completeWork(current, workInProgress, renderLanes) {
)),
(workInProgress.stateNode = current),
markUpdate(workInProgress));
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
return null;
@@ -7067,8 +7060,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7189,7 +7181,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
current && markUpdate(workInProgress);
}
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -7414,19 +7405,16 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress),
null !== workInProgress.ref &&
(markRef(workInProgress), markUpdate(workInProgress)))
: (null !== workInProgress.ref && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress)),
null === current &&
((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress)),
null !== workInProgress.ref && markUpdate(workInProgress),
bubbleProperties(workInProgress),
null
);
@@ -11436,7 +11424,7 @@ beginWork = function (current, workInProgress, renderLanes) {
return workInProgress;
case 26:
return (
markRef$1(current, workInProgress),
markRef(current, workInProgress),
(renderLanes = workInProgress.memoizedState =
getResource(
workInProgress.type,
@@ -11481,7 +11469,7 @@ beginWork = function (current, workInProgress, renderLanes) {
Component,
renderLanes
)),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
workInProgress.child
);
case 5:
@@ -11539,7 +11527,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -11716,12 +11704,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -16695,7 +16680,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1778 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-611b775e",
version: "18.3.0-www-modern-475df715",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2143 = {
@@ -16726,7 +16711,7 @@ var internals$jscomp$inline_2143 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-611b775e"
reconcilerVersion: "18.3.0-www-modern-475df715"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2144 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -16997,4 +16982,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-611b775e";
exports.version = "18.3.0-www-modern-475df715";
@@ -5617,7 +5617,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -5710,7 +5710,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -5996,7 +5996,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !didCaptureError)
return (
@@ -7288,9 +7288,6 @@ function getChildContextValues(context) {
function markUpdate(workInProgress) {
workInProgress.flags |= 4;
}
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
workInProgress.flags &= -16777217;
@@ -7463,7 +7460,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = workInProgress.memoizedState;
if (null === current)
markUpdate(workInProgress),
null !== workInProgress.ref && markRef(workInProgress),
null !== renderLanes
? (bubbleProperties(workInProgress),
preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
@@ -7472,7 +7468,6 @@ function completeWork(current, workInProgress, renderLanes) {
else {
var currentResource = current.memoizedState;
renderLanes !== currentResource && markUpdate(workInProgress);
current.ref !== workInProgress.ref && markRef(workInProgress);
null !== renderLanes
? (bubbleProperties(workInProgress),
renderLanes === currentResource
@@ -7488,8 +7483,7 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = rootInstanceStackCursor.current;
currentResource = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7513,7 +7507,6 @@ function completeWork(current, workInProgress, renderLanes) {
)),
(workInProgress.stateNode = current),
markUpdate(workInProgress));
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
return null;
@@ -7521,8 +7514,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7643,7 +7635,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
current && markUpdate(workInProgress);
}
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -7895,19 +7886,16 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress),
null !== workInProgress.ref &&
(markRef(workInProgress), markUpdate(workInProgress)))
: (null !== workInProgress.ref && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress)),
null === current &&
((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress)),
null !== workInProgress.ref && markUpdate(workInProgress),
bubbleProperties(workInProgress),
null
);
@@ -12353,7 +12341,7 @@ beginWork = function (current, workInProgress, renderLanes) {
return workInProgress;
case 26:
return (
markRef$1(current, workInProgress),
markRef(current, workInProgress),
(renderLanes = workInProgress.memoizedState =
getResource(
workInProgress.type,
@@ -12398,7 +12386,7 @@ beginWork = function (current, workInProgress, renderLanes) {
Component,
renderLanes
)),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
workInProgress.child
);
case 5:
@@ -12456,7 +12444,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -12656,12 +12644,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -17948,7 +17933,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1904 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-02a1a9e1",
version: "18.3.0-www-classic-cd10b2be",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -17992,7 +17977,7 @@ var devToolsConfig$jscomp$inline_1904 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-02a1a9e1"
reconcilerVersion: "18.3.0-www-classic-cd10b2be"
});
assign(Internals, {
ReactBrowserEventEmitter: {
@@ -18322,7 +18307,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-classic-02a1a9e1";
exports.version = "18.3.0-www-classic-cd10b2be";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -5485,7 +5485,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -5578,7 +5578,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -5848,7 +5848,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
hasContext = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !hasContext)
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
@@ -7114,9 +7114,6 @@ function getChildContextValues(context) {
function markUpdate(workInProgress) {
workInProgress.flags |= 4;
}
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
workInProgress.flags &= -16777217;
@@ -7283,7 +7280,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = workInProgress.memoizedState;
if (null === current)
markUpdate(workInProgress),
null !== workInProgress.ref && markRef(workInProgress),
null !== renderLanes
? (bubbleProperties(workInProgress),
preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
@@ -7292,7 +7288,6 @@ function completeWork(current, workInProgress, renderLanes) {
else {
var currentResource = current.memoizedState;
renderLanes !== currentResource && markUpdate(workInProgress);
current.ref !== workInProgress.ref && markRef(workInProgress);
null !== renderLanes
? (bubbleProperties(workInProgress),
renderLanes === currentResource
@@ -7308,8 +7303,7 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = rootInstanceStackCursor.current;
currentResource = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7333,7 +7327,6 @@ function completeWork(current, workInProgress, renderLanes) {
)),
(workInProgress.stateNode = current),
markUpdate(workInProgress));
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
return null;
@@ -7341,8 +7334,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7463,7 +7455,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
current && markUpdate(workInProgress);
}
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -7711,19 +7702,16 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress),
null !== workInProgress.ref &&
(markRef(workInProgress), markUpdate(workInProgress)))
: (null !== workInProgress.ref && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress)),
null === current &&
((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress)),
null !== workInProgress.ref && markUpdate(workInProgress),
bubbleProperties(workInProgress),
null
);
@@ -12165,7 +12153,7 @@ beginWork = function (current, workInProgress, renderLanes) {
return workInProgress;
case 26:
return (
markRef$1(current, workInProgress),
markRef(current, workInProgress),
(renderLanes = workInProgress.memoizedState =
getResource(
workInProgress.type,
@@ -12210,7 +12198,7 @@ beginWork = function (current, workInProgress, renderLanes) {
Component,
renderLanes
)),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
workInProgress.child
);
case 5:
@@ -12268,7 +12256,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -12451,12 +12439,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -17458,7 +17443,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1863 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-827e818d",
version: "18.3.0-www-modern-eef60811",
rendererPackageName: "react-dom"
};
(function (internals) {
@@ -17503,7 +17488,7 @@ var devToolsConfig$jscomp$inline_1863 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-827e818d"
reconcilerVersion: "18.3.0-www-modern-eef60811"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
@@ -17761,7 +17746,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-827e818d";
exports.version = "18.3.0-www-modern-eef60811";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -19901,7 +19901,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
nextProps.mode === "hidden" ||
@@ -20259,7 +20259,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -20504,7 +20506,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -20830,13 +20832,13 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateHostHoistable(current, workInProgress, renderLanes) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var currentProps = current === null ? null : current.memoizedProps;
var resource = (workInProgress.memoizedState = getResource(
workInProgress.type,
@@ -20887,7 +20889,7 @@ if (__DEV__) {
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
return workInProgress.child;
}
@@ -22721,6 +22723,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -24573,10 +24576,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -25149,10 +25148,6 @@ if (__DEV__) {
// phase if we are not hydrating.
markUpdate(workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -25176,10 +25171,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -25228,10 +25219,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25271,11 +25258,6 @@ if (__DEV__) {
workInProgress.stateNode = instance;
markUpdate(workInProgress);
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -25289,10 +25271,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25338,11 +25316,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -25780,17 +25753,16 @@ if (__DEV__) {
prepareScopeUpdate(scopeInstance, workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -36524,7 +36496,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-www-classic-3c4221fd";
var ReactVersion = "18.3.0-www-classic-31ea3e04";
function createPortal$1(
children,
@@ -19811,7 +19811,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
nextProps.mode === "hidden" ||
@@ -20169,7 +20169,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -20404,7 +20406,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -20710,13 +20712,13 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
function updateHostHoistable(current, workInProgress, renderLanes) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var currentProps = current === null ? null : current.memoizedProps;
var resource = (workInProgress.memoizedState = getResource(
workInProgress.type,
@@ -20767,7 +20769,7 @@ if (__DEV__) {
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
return workInProgress.child;
}
@@ -22601,6 +22603,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -24447,10 +24450,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -25016,10 +25015,6 @@ if (__DEV__) {
// phase if we are not hydrating.
markUpdate(workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -25043,10 +25038,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
if (nextResource !== null) {
// This is a Hoistable Resource
// This must come at the very end of the complete phase.
@@ -25095,10 +25086,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25138,11 +25125,6 @@ if (__DEV__) {
workInProgress.stateNode = instance;
markUpdate(workInProgress);
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -25156,10 +25138,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -25205,11 +25183,6 @@ if (__DEV__) {
markUpdate(workInProgress);
}
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -25639,17 +25612,16 @@ if (__DEV__) {
prepareScopeUpdate(scopeInstance, workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -36360,7 +36332,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-www-modern-591385be";
var ReactVersion = "18.3.0-www-modern-7a2df4a3";
function createPortal$1(
children,
@@ -5488,7 +5488,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -5581,7 +5581,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -5863,7 +5863,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !didCaptureError)
return (
@@ -7130,9 +7130,6 @@ function getChildContextValues(context) {
function markUpdate(workInProgress) {
workInProgress.flags |= 4;
}
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
workInProgress.flags &= -16777217;
@@ -7269,7 +7266,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = workInProgress.memoizedState;
if (null === current)
markUpdate(workInProgress),
null !== workInProgress.ref && markRef(workInProgress),
null !== renderLanes
? (bubbleProperties(workInProgress),
preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
@@ -7278,7 +7274,6 @@ function completeWork(current, workInProgress, renderLanes) {
else {
var currentResource = current.memoizedState;
renderLanes !== currentResource && markUpdate(workInProgress);
current.ref !== workInProgress.ref && markRef(workInProgress);
null !== renderLanes
? (bubbleProperties(workInProgress),
renderLanes === currentResource
@@ -7294,8 +7289,7 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = rootInstanceStackCursor.current;
currentResource = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7319,7 +7313,6 @@ function completeWork(current, workInProgress, renderLanes) {
)),
(workInProgress.stateNode = current),
markUpdate(workInProgress));
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
return null;
@@ -7327,8 +7320,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7449,7 +7441,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
current && markUpdate(workInProgress);
}
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -7678,19 +7669,16 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress),
null !== workInProgress.ref &&
(markRef(workInProgress), markUpdate(workInProgress)))
: (null !== workInProgress.ref && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress)),
null === current &&
((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress)),
null !== workInProgress.ref && markUpdate(workInProgress),
bubbleProperties(workInProgress),
null
);
@@ -11890,7 +11878,7 @@ beginWork = function (current, workInProgress, renderLanes) {
return workInProgress;
case 26:
return (
markRef$1(current, workInProgress),
markRef(current, workInProgress),
(renderLanes = workInProgress.memoizedState =
getResource(
workInProgress.type,
@@ -11935,7 +11923,7 @@ beginWork = function (current, workInProgress, renderLanes) {
Component,
renderLanes
)),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
workInProgress.child
);
case 5:
@@ -11993,7 +11981,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -12187,12 +12175,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -17508,7 +17493,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1824 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-7063c424",
version: "18.3.0-www-classic-3f55cb15",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2191 = {
@@ -17538,7 +17523,7 @@ var internals$jscomp$inline_2191 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-7063c424"
reconcilerVersion: "18.3.0-www-classic-3f55cb15"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2192 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -18032,4 +18017,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-classic-7063c424";
exports.version = "18.3.0-www-classic-3f55cb15";
@@ -5417,7 +5417,7 @@ function updateOffscreenComponent(current, workInProgress, renderLanes) {
nextChildren = nextProps.children,
nextIsDetached = 0 !== (workInProgress.stateNode._pendingVisibility & 2),
prevState = null !== current ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (
"hidden" === nextProps.mode ||
"unstable-defer-without-hiding" === nextProps.mode ||
@@ -5510,7 +5510,7 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (
(null === current && null !== ref) ||
@@ -5776,7 +5776,7 @@ function finishClassComponent(
hasContext,
renderLanes
) {
markRef$1(current, workInProgress);
markRef(current, workInProgress);
hasContext = 0 !== (workInProgress.flags & 128);
if (!shouldUpdate && !hasContext)
return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
@@ -7023,9 +7023,6 @@ function getChildContextValues(context) {
function markUpdate(workInProgress) {
workInProgress.flags |= 4;
}
function markRef(workInProgress) {
workInProgress.flags |= 2097664;
}
function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
workInProgress.flags &= -16777217;
@@ -7156,7 +7153,6 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = workInProgress.memoizedState;
if (null === current)
markUpdate(workInProgress),
null !== workInProgress.ref && markRef(workInProgress),
null !== renderLanes
? (bubbleProperties(workInProgress),
preloadResourceAndSuspendIfNeeded(workInProgress, renderLanes))
@@ -7165,7 +7161,6 @@ function completeWork(current, workInProgress, renderLanes) {
else {
var currentResource = current.memoizedState;
renderLanes !== currentResource && markUpdate(workInProgress);
current.ref !== workInProgress.ref && markRef(workInProgress);
null !== renderLanes
? (bubbleProperties(workInProgress),
renderLanes === currentResource
@@ -7181,8 +7176,7 @@ function completeWork(current, workInProgress, renderLanes) {
renderLanes = rootInstanceStackCursor.current;
currentResource = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7206,7 +7200,6 @@ function completeWork(current, workInProgress, renderLanes) {
)),
(workInProgress.stateNode = current),
markUpdate(workInProgress));
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
return null;
@@ -7214,8 +7207,7 @@ function completeWork(current, workInProgress, renderLanes) {
popHostContext(workInProgress);
renderLanes = workInProgress.type;
if (null !== current && null != workInProgress.stateNode)
current.memoizedProps !== newProps && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress);
current.memoizedProps !== newProps && markUpdate(workInProgress);
else {
if (!newProps) {
if (null === workInProgress.stateNode)
@@ -7336,7 +7328,6 @@ function completeWork(current, workInProgress, renderLanes) {
}
current && markUpdate(workInProgress);
}
null !== workInProgress.ref && markRef(workInProgress);
}
bubbleProperties(workInProgress);
workInProgress.flags &= -16777217;
@@ -7561,19 +7552,16 @@ function completeWork(current, workInProgress, renderLanes) {
return null;
case 21:
return (
null === current
? ((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress),
null !== workInProgress.ref &&
(markRef(workInProgress), markUpdate(workInProgress)))
: (null !== workInProgress.ref && markUpdate(workInProgress),
current.ref !== workInProgress.ref && markRef(workInProgress)),
null === current &&
((current = {
DO_NOT_USE_queryAllNodes: DO_NOT_USE_queryAllNodes,
DO_NOT_USE_queryFirstNode: DO_NOT_USE_queryFirstNode,
containsNode: containsNode$1,
getChildContextValues: getChildContextValues
}),
(workInProgress.stateNode = current),
(current[internalInstanceKey] = workInProgress)),
null !== workInProgress.ref && markUpdate(workInProgress),
bubbleProperties(workInProgress),
null
);
@@ -11769,7 +11757,7 @@ beginWork = function (current, workInProgress, renderLanes) {
return workInProgress;
case 26:
return (
markRef$1(current, workInProgress),
markRef(current, workInProgress),
(renderLanes = workInProgress.memoizedState =
getResource(
workInProgress.type,
@@ -11814,7 +11802,7 @@ beginWork = function (current, workInProgress, renderLanes) {
Component,
renderLanes
)),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
workInProgress.child
);
case 5:
@@ -11872,7 +11860,7 @@ beginWork = function (current, workInProgress, renderLanes) {
HostTransitionContext,
renderLanes
))),
markRef$1(current, workInProgress),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
@@ -12049,12 +12037,9 @@ beginWork = function (current, workInProgress, renderLanes) {
return updateSuspenseListComponent(current, workInProgress, renderLanes);
case 21:
return (
reconcileChildren(
current,
workInProgress,
workInProgress.pendingProps.children,
renderLanes
),
(Component = workInProgress.pendingProps.children),
markRef(current, workInProgress),
reconcileChildren(current, workInProgress, Component, renderLanes),
workInProgress.child
);
case 22:
@@ -17085,7 +17070,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1783 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-90e18ae7",
version: "18.3.0-www-modern-059ff9ab",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2154 = {
@@ -17116,7 +17101,7 @@ var internals$jscomp$inline_2154 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-90e18ae7"
reconcilerVersion: "18.3.0-www-modern-059ff9ab"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17537,4 +17522,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-90e18ae7";
exports.version = "18.3.0-www-modern-059ff9ab";
@@ -13209,7 +13209,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (nextProps.mode === "hidden" || enableLegacyHidden || nextIsDetached) {
// Rendering a hidden tree.
@@ -13483,7 +13483,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -13701,7 +13703,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -13898,7 +13900,7 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -15515,6 +15517,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -16886,10 +16889,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -17381,10 +17380,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -17424,11 +17419,6 @@ if (__DEV__) {
appendAllChildren(_instance3, workInProgress);
workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -17851,17 +17841,16 @@ if (__DEV__) {
prepareScopeUpdate(scopeInstance, workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -26067,7 +26056,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-www-classic-cfa64f96";
var ReactVersion = "18.3.0-www-classic-40c57c16";
// Might add PROFILE later.
@@ -13209,7 +13209,7 @@ if (__DEV__) {
var nextIsDetached =
(workInProgress.stateNode._pendingVisibility & OffscreenDetached) !== 0;
var prevState = current !== null ? current.memoizedState : null;
markRef$1(current, workInProgress);
markRef(current, workInProgress);
if (nextProps.mode === "hidden" || enableLegacyHidden || nextIsDetached) {
// Rendering a hidden tree.
@@ -13483,7 +13483,9 @@ if (__DEV__) {
return workInProgress.child;
}
function markRef$1(current, workInProgress) {
function markRef(current, workInProgress) {
// TODO: This is also where we should check the type of the ref and error if
// an invalid one is passed, instead of during child reconcilation.
var ref = workInProgress.ref;
if (
@@ -13701,7 +13703,7 @@ if (__DEV__) {
renderLanes
) {
// Refs should update even if shouldComponentUpdate returns false
markRef$1(current, workInProgress);
markRef(current, workInProgress);
var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags$1;
if (!shouldUpdate && !didCaptureError) {
@@ -13898,7 +13900,7 @@ if (__DEV__) {
}
}
markRef$1(current, workInProgress);
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -15515,6 +15517,7 @@ if (__DEV__) {
function updateScopeComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
markRef(current, workInProgress);
reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -16886,10 +16889,6 @@ if (__DEV__) {
workInProgress.flags |= Update;
}
function markRef(workInProgress) {
workInProgress.flags |= Ref | RefStatic;
}
function appendAllChildren(
parent,
workInProgress,
@@ -17381,10 +17380,6 @@ if (__DEV__) {
if (current !== null && workInProgress.stateNode != null) {
updateHostComponent(current, workInProgress, _type2, newProps);
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
} else {
if (!newProps) {
if (workInProgress.stateNode === null) {
@@ -17424,11 +17419,6 @@ if (__DEV__) {
appendAllChildren(_instance3, workInProgress);
workInProgress.stateNode = _instance3; // Certain renderers require commit-time effects for initial mount.
}
if (workInProgress.ref !== null) {
// If there is a ref on a host node we need to schedule a callback
markRef(workInProgress);
}
}
bubbleProperties(workInProgress); // This must come at the very end of the complete phase, because it might
@@ -17851,17 +17841,16 @@ if (__DEV__) {
prepareScopeUpdate(scopeInstance, workInProgress);
if (workInProgress.ref !== null) {
markRef(workInProgress);
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
} else {
if (workInProgress.ref !== null) {
// Scope components always do work in the commit phase if there's a
// ref attached.
markUpdate(workInProgress);
}
if (current.ref !== workInProgress.ref) {
markRef(workInProgress);
}
}
bubbleProperties(workInProgress);
@@ -26067,7 +26056,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-www-modern-c4de807b";
var ReactVersion = "18.3.0-www-modern-5473e917";
// Might add PROFILE later.