Implement requestPaint in the actual scheduler (#31784)

When implementing passive effects we did a pretty massive oversight.
While the passive effect is scheduled into its own scheduler task, the
scheduler doesn't always yield to the browser if it has time left. That
means that if you have a fast commit phase, it might try to squeeze in
the passive effects in the same frame but those then might end being
very heavy.

We had `requestPaint()` for this but that was only implemented for the
`isInputPending` experiment. It wasn't thought we needed it for the
regular scheduler because it yields "every frame" anyway - but it
doesn't yield every task. While the `isInputPending` experiment showed
that it wasn't actually any significant impact, and it was better to
keep shorter yield time anyway. Which is why we deleted the code.
Whatever small win it did see in some cases might have been actually due
to this issue rather than anything to do with `isInputPending` at all.

As you can see in https://github.com/facebook/react/pull/31782 we do
have this implemented in the mock scheduler and a lot of behavior that
we assert assumes that this works.

So this just implements yielding after `requestPaint` is called.

Before:

<img width="1023" alt="Screenshot 2024-12-14 at 3 40 24 PM"
src="https://github.com/user-attachments/assets/d60f4bb2-c8f8-4f91-a402-9ac25b278450"
/>

After:

<img width="1108" alt="Screenshot 2024-12-14 at 3 41 25 PM"
src="https://github.com/user-attachments/assets/170cdb90-a049-436f-9501-be3fb9bc04ca"
/>

Notice how in after the native task is split into two. It might not
always actually paint and the native scheduler might make the same
mistake and think it has enough time left but it's at least less likely
to.

We do have another way to do this. When we yield a continuation we also
yield to the native browser. This is to enable the Suspense Optimization
(currently disabled) to work. We could do the same for passive effects
and, in fact, I have a branch that does but because that requires a lot
more tests to be fixed it's a lot more invasive of a change. The nice
thing about this approach is that this is not even running in tests at
all and the tests we do have assert that this is the behavior already. 😬

DiffTrain build for [c80b336d23](https://github.com/facebook/react/commit/c80b336d23aa472b5e5910268138ac0447d6ae19)
This commit is contained in:
sebmarkbage
2024-12-14 13:24:44 -08:00
parent 82c0c104e7
commit da9bea2acb
40 changed files with 146 additions and 98 deletions
+1 -1
View File
@@ -1 +1 @@
c32780eeb4c44e138d09a35da841926f512d3b07
c80b336d23aa472b5e5910268138ac0447d6ae19
+1 -1
View File
@@ -1 +1 @@
c32780eeb4c44e138d09a35da841926f512d3b07
c80b336d23aa472b5e5910268138ac0447d6ae19
+1 -1
View File
@@ -1954,7 +1954,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -1954,7 +1954,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
+1 -1
View File
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -17189,10 +17189,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17226,7 +17226,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+3 -3
View File
@@ -16952,10 +16952,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16989,7 +16989,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -10825,10 +10825,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1500 = {
bundleType: 0,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1501 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10854,4 +10854,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
@@ -10541,10 +10541,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1479 = {
bundleType: 0,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1480 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10570,4 +10570,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
@@ -27665,11 +27665,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-classic-d1dd7fea-20241214" !== isomorphicReactPackageVersion)
if ("19.1.0-www-classic-c80b336d-20241214" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-www-classic-d1dd7fea-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-classic-c80b336d-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27712,10 +27712,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28322,7 +28322,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+5 -5
View File
@@ -27444,11 +27444,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-modern-d1dd7fea-20241214" !== isomorphicReactPackageVersion)
if ("19.1.0-www-modern-c80b336d-20241214" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-www-modern-d1dd7fea-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-modern-c80b336d-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27491,10 +27491,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28101,7 +28101,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -17282,14 +17282,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1765 = React.version;
if (
"19.1.0-www-classic-d1dd7fea-20241214" !==
"19.1.0-www-classic-c80b336d-20241214" !==
isomorphicReactPackageVersion$jscomp$inline_1765
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1765,
"19.1.0-www-classic-d1dd7fea-20241214"
"19.1.0-www-classic-c80b336d-20241214"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17307,10 +17307,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2306 = {
bundleType: 0,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2307 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17675,4 +17675,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
@@ -17013,14 +17013,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1755 = React.version;
if (
"19.1.0-www-modern-d1dd7fea-20241214" !==
"19.1.0-www-modern-c80b336d-20241214" !==
isomorphicReactPackageVersion$jscomp$inline_1755
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1755,
"19.1.0-www-modern-d1dd7fea-20241214"
"19.1.0-www-modern-c80b336d-20241214"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17038,10 +17038,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2288 = {
bundleType: 0,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2289 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17406,4 +17406,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
@@ -17971,14 +17971,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1858 = React.version;
if (
"19.1.0-www-classic-d1dd7fea-20241214" !==
"19.1.0-www-classic-c80b336d-20241214" !==
isomorphicReactPackageVersion$jscomp$inline_1858
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1858,
"19.1.0-www-classic-d1dd7fea-20241214"
"19.1.0-www-classic-c80b336d-20241214"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17996,10 +17996,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1860 = {
bundleType: 0,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1860.getLaneLabelMap = getLaneLabelMap),
@@ -18367,7 +18367,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -17701,14 +17701,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1848 = React.version;
if (
"19.1.0-www-modern-d1dd7fea-20241214" !==
"19.1.0-www-modern-c80b336d-20241214" !==
isomorphicReactPackageVersion$jscomp$inline_1848
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1848,
"19.1.0-www-modern-d1dd7fea-20241214"
"19.1.0-www-modern-c80b336d-20241214"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17726,10 +17726,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1850 = {
bundleType: 0,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1850.getLaneLabelMap = getLaneLabelMap),
@@ -18097,7 +18097,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -9158,5 +9158,5 @@ __DEV__ &&
'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 = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
})();
@@ -8984,5 +8984,5 @@ __DEV__ &&
'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 = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
})();
@@ -5906,4 +5906,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 = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
@@ -5818,4 +5818,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 = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
@@ -27999,11 +27999,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-classic-d1dd7fea-20241214" !== isomorphicReactPackageVersion)
if ("19.1.0-www-classic-c80b336d-20241214" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-www-classic-d1dd7fea-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-classic-c80b336d-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -28046,10 +28046,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28822,5 +28822,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
})();
@@ -27778,11 +27778,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-modern-d1dd7fea-20241214" !== isomorphicReactPackageVersion)
if ("19.1.0-www-modern-c80b336d-20241214" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-www-modern-d1dd7fea-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-modern-c80b336d-20241214\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -27825,10 +27825,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -28601,5 +28601,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
})();
@@ -17611,14 +17611,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1794 = React.version;
if (
"19.1.0-www-classic-d1dd7fea-20241214" !==
"19.1.0-www-classic-c80b336d-20241214" !==
isomorphicReactPackageVersion$jscomp$inline_1794
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1794,
"19.1.0-www-classic-d1dd7fea-20241214"
"19.1.0-www-classic-c80b336d-20241214"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17636,10 +17636,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2340 = {
bundleType: 0,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2341 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -18155,4 +18155,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
@@ -17342,14 +17342,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1784 = React.version;
if (
"19.1.0-www-modern-d1dd7fea-20241214" !==
"19.1.0-www-modern-c80b336d-20241214" !==
isomorphicReactPackageVersion$jscomp$inline_1784
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1784,
"19.1.0-www-modern-d1dd7fea-20241214"
"19.1.0-www-modern-c80b336d-20241214"
)
);
Internals.findDOMNode = function (componentOrElement) {
@@ -17367,10 +17367,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2322 = {
bundleType: 0,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2323 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17886,4 +17886,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
@@ -19353,7 +19353,7 @@ __DEV__ &&
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -19127,7 +19127,7 @@ __DEV__ &&
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -12855,7 +12855,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -12574,7 +12574,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -15004,10 +15004,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-d1dd7fea-20241214",
version: "19.1.0-www-classic-c80b336d-20241214",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-classic-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15142,5 +15142,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.version = "19.1.0-www-classic-d1dd7fea-20241214";
exports.version = "19.1.0-www-classic-c80b336d-20241214";
})();
@@ -15004,10 +15004,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-d1dd7fea-20241214",
version: "19.1.0-www-modern-c80b336d-20241214",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-d1dd7fea-20241214"
reconcilerVersion: "19.1.0-www-modern-c80b336d-20241214"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15142,5 +15142,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.version = "19.1.0-www-modern-d1dd7fea-20241214";
exports.version = "19.1.0-www-modern-c80b336d-20241214";
})();
+10 -2
View File
@@ -14,6 +14,7 @@
__DEV__ &&
(function () {
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
@@ -228,7 +229,11 @@ __DEV__ &&
}
}
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function requestHostCallback() {
isMessageLoopRunning ||
@@ -279,6 +284,7 @@ __DEV__ &&
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
@@ -366,7 +372,9 @@ __DEV__ &&
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
+10 -2
View File
@@ -14,6 +14,7 @@
__DEV__ &&
(function () {
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
@@ -228,7 +229,11 @@ __DEV__ &&
}
}
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function requestHostCallback() {
isMessageLoopRunning ||
@@ -279,6 +284,7 @@ __DEV__ &&
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
@@ -366,7 +372,9 @@ __DEV__ &&
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
@@ -85,6 +85,7 @@ var taskQueue = [],
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
@@ -116,9 +117,14 @@ var isMessageLoopRunning = !1,
frameInterval = 10,
startTime = -1;
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
@@ -264,7 +270,9 @@ exports.unstable_next = function (eventHandler) {
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
+10 -2
View File
@@ -85,6 +85,7 @@ var taskQueue = [],
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
@@ -116,9 +117,14 @@ var isMessageLoopRunning = !1,
frameInterval = 10,
startTime = -1;
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
@@ -264,7 +270,9 @@ exports.unstable_next = function (eventHandler) {
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
@@ -89,6 +89,7 @@ var taskQueue = [],
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
@@ -120,9 +121,14 @@ var isMessageLoopRunning = !1,
frameInterval = 10,
startTime = -1;
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
@@ -268,7 +274,9 @@ exports.unstable_next = function (eventHandler) {
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
@@ -89,6 +89,7 @@ var taskQueue = [],
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
needsPaint = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
@@ -120,9 +121,14 @@ var isMessageLoopRunning = !1,
frameInterval = 10,
startTime = -1;
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
return needsPaint
? !0
: exports.unstable_now() - startTime < frameInterval
? !1
: !0;
}
function performWorkUntilDeadline() {
needsPaint = !1;
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
@@ -268,7 +274,9 @@ exports.unstable_next = function (eventHandler) {
exports.unstable_pauseExecution = function () {
isSchedulerPaused = !0;
};
exports.unstable_requestPaint = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
+1 -1
View File
@@ -1 +1 @@
19.1.0-www-classic-d1dd7fea-20241214
19.1.0-www-classic-c80b336d-20241214
+1 -1
View File
@@ -1 +1 @@
19.1.0-www-modern-d1dd7fea-20241214
19.1.0-www-modern-c80b336d-20241214