Skip to content

Commit

Permalink
[Fizz] Start initial work immediately (#31079)
Browse files Browse the repository at this point in the history
In a recent update we make Flight start working immediately rather than
waitin for a new task. This commit updates fizz to have similar
mechanics. We start the render in the currently running task but we do
so in a microtask to avoid reentrancy. This aligns Fizz with Flight.

ref: #30961

DiffTrain build for [67fee58](67fee58)
  • Loading branch information
gnoff committed Sep 26, 2024
1 parent b113f68 commit e2de2ad
Show file tree
Hide file tree
Showing 34 changed files with 248 additions and 242 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17014,11 +17014,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-76aee6f3-20240926",
version: "19.0.0-www-classic-67fee58b-20240926",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-classic-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -17052,7 +17052,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16457,11 +16457,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-76aee6f3-20240926",
version: "19.0.0-www-modern-67fee58b-20240926",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-modern-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16495,7 +16495,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10826,13 +10826,13 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1467 = {
bundleType: 0,
version: "19.0.0-www-classic-76aee6f3-20240926",
version: "19.0.0-www-classic-67fee58b-20240926",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-classic-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-classic-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1468 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10858,4 +10858,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10337,13 +10337,13 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1459 = {
bundleType: 0,
version: "19.0.0-www-modern-76aee6f3-20240926",
version: "19.0.0-www-modern-67fee58b-20240926",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function () {
return null;
},
reconcilerVersion: "19.0.0-www-modern-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-modern-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1460 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10369,4 +10369,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -27771,11 +27771,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-76aee6f3-20240926" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-67fee58b-20240926" !== 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.0.0-www-classic-76aee6f3-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-67fee58b-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27819,11 +27819,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-classic-76aee6f3-20240926",
version: "19.0.0-www-classic-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-classic-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28476,7 +28476,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -26885,11 +26885,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-76aee6f3-20240926" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-67fee58b-20240926" !== 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.0.0-www-modern-76aee6f3-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-67fee58b-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26932,11 +26932,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-www-modern-76aee6f3-20240926",
version: "19.0.0-www-modern-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-modern-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -27541,7 +27541,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17412,14 +17412,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1774 = React.version;
if (
"19.0.0-www-classic-76aee6f3-20240926" !==
"19.0.0-www-classic-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1774
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1774,
"19.0.0-www-classic-76aee6f3-20240926"
"19.0.0-www-classic-67fee58b-20240926"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -17464,11 +17464,11 @@ Internals.Events = [
];
var internals$jscomp$inline_2287 = {
bundleType: 0,
version: "19.0.0-www-classic-76aee6f3-20240926",
version: "19.0.0-www-classic-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-classic-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2288 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17924,4 +17924,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16780,14 +16780,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1745 = React.version;
if (
"19.0.0-www-modern-76aee6f3-20240926" !==
"19.0.0-www-modern-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1745
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1745,
"19.0.0-www-modern-76aee6f3-20240926"
"19.0.0-www-modern-67fee58b-20240926"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -16805,11 +16805,11 @@ Internals.Events = [
];
var internals$jscomp$inline_2278 = {
bundleType: 0,
version: "19.0.0-www-modern-76aee6f3-20240926",
version: "19.0.0-www-modern-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-modern-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2279 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17172,4 +17172,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -18137,14 +18137,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version;
if (
"19.0.0-www-classic-76aee6f3-20240926" !==
"19.0.0-www-classic-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1867
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1867,
"19.0.0-www-classic-76aee6f3-20240926"
"19.0.0-www-classic-67fee58b-20240926"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -18189,11 +18189,11 @@ Internals.Events = [
];
var internals$jscomp$inline_1874 = {
bundleType: 0,
version: "19.0.0-www-classic-76aee6f3-20240926",
version: "19.0.0-www-classic-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-classic-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-classic-67fee58b-20240926"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1874.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18652,7 +18652,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-76aee6f3-20240926";
exports.version = "19.0.0-www-classic-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -17488,14 +17488,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1838 = React.version;
if (
"19.0.0-www-modern-76aee6f3-20240926" !==
"19.0.0-www-modern-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1838
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1838,
"19.0.0-www-modern-76aee6f3-20240926"
"19.0.0-www-modern-67fee58b-20240926"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17513,11 +17513,11 @@ Internals.Events = [
];
var internals$jscomp$inline_1840 = {
bundleType: 0,
version: "19.0.0-www-modern-76aee6f3-20240926",
version: "19.0.0-www-modern-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-www-modern-76aee6f3-20240926"
reconcilerVersion: "19.0.0-www-modern-67fee58b-20240926"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1840.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -17883,7 +17883,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-76aee6f3-20240926";
exports.version = "19.0.0-www-modern-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit e2de2ad

Please sign in to comment.