mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
useDeferredValue has higher priority than partial hydration (#27550)
By default, partial hydration is given the lowest possible priority,
because until a tree is updated, the server-rendered HTML is assumed to
match the final resolved HTML.
However, this isn't completely true because a component may choose to
"upgrade" itself upon hydration. The simplest example is a component
that calls setState in a useEffect to switch to a richer implementation
of the UI. Another example is a component that doesn't have a server-
rendered implementation, so it intentionally suspends to force a client-
only render.
useDeferredValue is an example, too: the server only renders the first
pass (the initialValue) argument, and relies on the client to upgrade to
the final value.
What we should really do in these cases is emit some information into
the Fizz stream so that Fiber knows to prioritize the hydration of
certain trees. We plan to add a mechanism for this in the future.
In the meantime, though, we can at least ensure that the priority of the
upgrade task is correct once it's "discovered" during hydration. In this
case, the priority of the task spawned by useDeferredValue should have
Transition priority, not Offscreen priority.
DiffTrain build for [779d59374e](https://github.com/facebook/react/commit/779d59374e8e852ce00728d895156a7574e1b456)
This commit is contained in:
@@ -1 +1 @@
|
||||
6db7f4209e6f32ebde298a0b7451710dd6aa3e19
|
||||
779d59374e8e852ce00728d895156a7574e1b456
|
||||
|
||||
@@ -27,7 +27,7 @@ if (
|
||||
}
|
||||
"use strict";
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-63396f54";
|
||||
var ReactVersion = "18.3.0-www-classic-273dc50b";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
@@ -587,4 +587,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-a546ef8a";
|
||||
exports.version = "18.3.0-www-classic-252d6948";
|
||||
|
||||
@@ -579,4 +579,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-ed902e38";
|
||||
exports.version = "18.3.0-www-modern-a27fae8a";
|
||||
|
||||
@@ -590,7 +590,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-82bf9b55";
|
||||
exports.version = "18.3.0-www-modern-53a85d2a";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-bb3a0070";
|
||||
var ReactVersion = "18.3.0-www-classic-a2f705e2";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -2281,8 +2281,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -24202,13 +24204,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
|
||||
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-f6a06001";
|
||||
var ReactVersion = "18.3.0-www-modern-0b462672";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -2278,8 +2278,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -23867,13 +23869,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
|
||||
@@ -579,7 +579,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -10179,7 +10181,7 @@ var slice = Array.prototype.slice,
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-24afbb39",
|
||||
version: "18.3.0-www-classic-daa48109",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1322 = {
|
||||
@@ -10210,7 +10212,7 @@ var internals$jscomp$inline_1322 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-24afbb39"
|
||||
reconcilerVersion: "18.3.0-www-classic-daa48109"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
@@ -467,7 +467,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -9848,7 +9850,7 @@ var slice = Array.prototype.slice,
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-27dfd1a3",
|
||||
version: "18.3.0-www-modern-5b0eeab3",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1302 = {
|
||||
@@ -9879,7 +9881,7 @@ var internals$jscomp$inline_1302 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-27dfd1a3"
|
||||
reconcilerVersion: "18.3.0-www-modern-5b0eeab3"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1303 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
@@ -2460,8 +2460,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -29689,13 +29691,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
@@ -34150,7 +34159,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-a73ccc38";
|
||||
var ReactVersion = "18.3.0-www-classic-0db07969";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -1817,8 +1817,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -29539,13 +29541,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
@@ -33995,7 +34004,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-682a5c12";
|
||||
var ReactVersion = "18.3.0-www-modern-1e4930fb";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -623,7 +623,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -9864,9 +9866,9 @@ function requestUpdateLane(fiber) {
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: requestTransitionLane());
|
||||
0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
||||
? requestTransitionLane()
|
||||
: 536870912);
|
||||
return workInProgressDeferredLane;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
@@ -16480,7 +16482,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1796 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-3c2b8f45",
|
||||
version: "18.3.0-www-classic-217e3cb6",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2142 = {
|
||||
@@ -16510,7 +16512,7 @@ var internals$jscomp$inline_2142 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-3c2b8f45"
|
||||
reconcilerVersion: "18.3.0-www-classic-217e3cb6"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2143 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -16847,4 +16849,4 @@ exports.useFormState = function () {
|
||||
exports.useFormStatus = function () {
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-3c2b8f45";
|
||||
exports.version = "18.3.0-www-classic-217e3cb6";
|
||||
|
||||
@@ -385,7 +385,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -9704,9 +9706,9 @@ function requestUpdateLane(fiber) {
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: requestTransitionLane());
|
||||
0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
||||
? requestTransitionLane()
|
||||
: 536870912);
|
||||
return workInProgressDeferredLane;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
@@ -16006,7 +16008,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1755 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-d4fb2ac8",
|
||||
version: "18.3.0-www-modern-c02ee778",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2106 = {
|
||||
@@ -16037,7 +16039,7 @@ var internals$jscomp$inline_2106 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-d4fb2ac8"
|
||||
reconcilerVersion: "18.3.0-www-modern-c02ee778"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2107 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -16302,4 +16304,4 @@ exports.useFormState = function () {
|
||||
exports.useFormStatus = function () {
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-d4fb2ac8";
|
||||
exports.version = "18.3.0-www-modern-c02ee778";
|
||||
|
||||
@@ -738,7 +738,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -10459,9 +10461,9 @@ function requestUpdateLane(fiber) {
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: requestTransitionLane());
|
||||
0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
||||
? requestTransitionLane()
|
||||
: 536870912);
|
||||
return workInProgressDeferredLane;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
@@ -17256,7 +17258,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1881 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-0f5bdde1",
|
||||
version: "18.3.0-www-classic-8b07531e",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -17300,7 +17302,7 @@ var devToolsConfig$jscomp$inline_1881 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-0f5bdde1"
|
||||
reconcilerVersion: "18.3.0-www-classic-8b07531e"
|
||||
});
|
||||
assign(Internals, {
|
||||
ReactBrowserEventEmitter: {
|
||||
@@ -17624,7 +17626,7 @@ exports.useFormState = function () {
|
||||
exports.useFormStatus = function () {
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-0f5bdde1";
|
||||
exports.version = "18.3.0-www-classic-8b07531e";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -500,7 +500,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -10293,9 +10295,9 @@ function requestUpdateLane(fiber) {
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: requestTransitionLane());
|
||||
0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
||||
? requestTransitionLane()
|
||||
: 536870912);
|
||||
return workInProgressDeferredLane;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
@@ -16776,7 +16778,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1840 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-88285787",
|
||||
version: "18.3.0-www-modern-ca7f5004",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -16821,7 +16823,7 @@ var devToolsConfig$jscomp$inline_1840 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-88285787"
|
||||
reconcilerVersion: "18.3.0-www-modern-ca7f5004"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
|
||||
exports.createPortal = function (children, container) {
|
||||
@@ -17073,7 +17075,7 @@ exports.useFormState = function () {
|
||||
exports.useFormStatus = function () {
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-88285787";
|
||||
exports.version = "18.3.0-www-modern-ca7f5004";
|
||||
|
||||
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
||||
if (
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-f6a06001";
|
||||
var ReactVersion = "18.3.0-www-modern-0b462672";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
|
||||
@@ -4989,4 +4989,4 @@ exports.renderToString = function (children, options) {
|
||||
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
|
||||
);
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-27dfd1a3";
|
||||
exports.version = "18.3.0-www-modern-5b0eeab3";
|
||||
|
||||
@@ -2449,8 +2449,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -30306,13 +30308,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
@@ -34767,7 +34776,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-0c4709ef";
|
||||
var ReactVersion = "18.3.0-www-classic-200887f0";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -1806,8 +1806,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -30156,13 +30158,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
@@ -34612,7 +34621,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-ed902e38";
|
||||
var ReactVersion = "18.3.0-www-modern-a27fae8a";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -623,7 +623,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -10136,9 +10138,9 @@ function requestUpdateLane(fiber) {
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: requestTransitionLane());
|
||||
0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
||||
? requestTransitionLane()
|
||||
: 536870912);
|
||||
return workInProgressDeferredLane;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
@@ -16809,7 +16811,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1825 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-63396f54",
|
||||
version: "18.3.0-www-classic-273dc50b",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2176 = {
|
||||
@@ -16839,7 +16841,7 @@ var internals$jscomp$inline_2176 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-63396f54"
|
||||
reconcilerVersion: "18.3.0-www-classic-273dc50b"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2177 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -17327,4 +17329,4 @@ exports.useFormState = function () {
|
||||
exports.useFormStatus = function () {
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-63396f54";
|
||||
exports.version = "18.3.0-www-classic-273dc50b";
|
||||
|
||||
@@ -385,7 +385,9 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
var spawnedLaneIndex = 31 - clz32(spawnedLane);
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] =
|
||||
root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes;
|
||||
root.entanglements[spawnedLaneIndex] |
|
||||
1073741824 |
|
||||
(entangledLanes & 4194218);
|
||||
}
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
|
||||
@@ -10027,9 +10029,9 @@ function requestUpdateLane(fiber) {
|
||||
function requestDeferredLane() {
|
||||
0 === workInProgressDeferredLane &&
|
||||
(workInProgressDeferredLane =
|
||||
0 !== (workInProgressRootRenderLanes & 536870912)
|
||||
? 536870912
|
||||
: requestTransitionLane());
|
||||
0 === (workInProgressRootRenderLanes & 536870912) || isHydrating
|
||||
? requestTransitionLane()
|
||||
: 536870912);
|
||||
return workInProgressDeferredLane;
|
||||
}
|
||||
function scheduleUpdateOnFiber(root, fiber, lane) {
|
||||
@@ -16386,7 +16388,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1784 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-modern-82bf9b55",
|
||||
version: "18.3.0-www-modern-53a85d2a",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2140 = {
|
||||
@@ -16417,7 +16419,7 @@ var internals$jscomp$inline_2140 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-modern-82bf9b55"
|
||||
reconcilerVersion: "18.3.0-www-modern-53a85d2a"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2141 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -16833,4 +16835,4 @@ exports.useFormState = function () {
|
||||
exports.useFormStatus = function () {
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-82bf9b55";
|
||||
exports.version = "18.3.0-www-modern-53a85d2a";
|
||||
|
||||
@@ -1795,8 +1795,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -21383,13 +21385,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
@@ -25258,7 +25267,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-a546ef8a";
|
||||
var ReactVersion = "18.3.0-www-classic-252d6948";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -1795,8 +1795,10 @@ function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
|
||||
root.entangledLanes |= spawnedLane;
|
||||
root.entanglements[spawnedLaneIndex] |=
|
||||
DeferredLane | // If the parent render task suspended, we must also entangle those lanes
|
||||
// with the spawned task.
|
||||
entangledLanes;
|
||||
// with the spawned task, so that the deferred task includes all the same
|
||||
// updates that the parent task did. We can exclude any lane that is not
|
||||
// used for updates (e.g. Offscreen).
|
||||
(entangledLanes & UpdateLanes);
|
||||
}
|
||||
|
||||
function markRootEntangled(root, entangledLanes) {
|
||||
@@ -21383,13 +21385,20 @@ function requestDeferredLane() {
|
||||
// If there are multiple useDeferredValue hooks in the same render, the
|
||||
// tasks that they spawn should all be batched together, so they should all
|
||||
// receive the same lane.
|
||||
if (includesSomeLane(workInProgressRootRenderLanes, OffscreenLane)) {
|
||||
// Check the priority of the current render to decide the priority of the
|
||||
// deferred task.
|
||||
// OffscreenLane is used for prerendering, but we also use OffscreenLane
|
||||
// for incremental hydration. It's given the lowest priority because the
|
||||
// initial HTML is the same as the final UI. But useDeferredValue during
|
||||
// hydration is an exception — we need to upgrade the UI to the final
|
||||
// value. So if we're currently hydrating, we treat it like a transition.
|
||||
var isPrerendering =
|
||||
includesSomeLane(workInProgressRootRenderLanes, OffscreenLane) &&
|
||||
!getIsHydrating();
|
||||
|
||||
if (isPrerendering) {
|
||||
// There's only one OffscreenLane, so if it contains deferred work, we
|
||||
// should just reschedule using the same lane.
|
||||
// TODO: We also use OffscreenLane for hydration, on the basis that the
|
||||
// initial HTML is the same as the hydrated UI, but since the deferred
|
||||
// task will change the UI, it should be treated like an update. Use
|
||||
// TransitionHydrationLane to trigger selective hydration.
|
||||
workInProgressDeferredLane = OffscreenLane;
|
||||
} else {
|
||||
// Everything else is spawned as a transition.
|
||||
@@ -25258,7 +25267,7 @@ function createFiberRoot(
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-7cbe762d";
|
||||
var ReactVersion = "18.3.0-www-modern-cc07473f";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user