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 f8028b9 commit 342e45c
Show file tree
Hide file tree
Showing 22 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-76aee6f3-20240926
19.0.0-native-fb-67fee58b-20240926
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0f4cae6b1cbb411dc57d936bba9fbf70>>
* @generated SignedSource<<241c2f55f72cd548e5c5e708cc0c0904>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f0104f30fe9a9f57683eab973220c947>>
* @generated SignedSource<<e63770cc34c6783b3ea24ba5ebbe84b3>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f0104f30fe9a9f57683eab973220c947>>
* @generated SignedSource<<e63770cc34c6783b3ea24ba5ebbe84b3>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0ce049479a2de9534d6d4dced76e33f2>>
* @generated SignedSource<<503ba4731e834b5434db2d420b2f53d3>>
*/

/*
Expand Down Expand Up @@ -25318,11 +25318,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-76aee6f3-20240926" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-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-native-fb-76aee6f3-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-native-fb-67fee58b-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25359,11 +25359,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926"
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -25507,5 +25507,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<34e1ee2f4eeb7d9daf2131fc5d8cf9eb>>
* @generated SignedSource<<03efb0b3eac957d94d20c32034cce178>>
*/

/*
Expand Down Expand Up @@ -15617,14 +15617,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1678 = React.version;
if (
"19.0.0-native-fb-76aee6f3-20240926" !==
"19.0.0-native-fb-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1678
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1678,
"19.0.0-native-fb-76aee6f3-20240926"
"19.0.0-native-fb-67fee58b-20240926"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15646,11 +15646,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2131 = {
bundleType: 0,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926"
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2132 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15754,4 +15754,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1773dcb3426c769125381ab3a4088ff4>>
* @generated SignedSource<<bc1bb463d6028af5884ccc8b07f56d1d>>
*/

/*
Expand Down Expand Up @@ -16272,14 +16272,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1768 = React.version;
if (
"19.0.0-native-fb-76aee6f3-20240926" !==
"19.0.0-native-fb-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1768
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1768,
"19.0.0-native-fb-76aee6f3-20240926"
"19.0.0-native-fb-67fee58b-20240926"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16301,11 +16301,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1775 = {
bundleType: 0,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926",
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$286 = 0;
Expand Down Expand Up @@ -16424,4 +16424,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ea5df5c796037b6429a5b1e2f0d90460>>
* @generated SignedSource<<fa03b21aac2b19f4b52ccf90793e5a36>>
*/

/*
Expand Down Expand Up @@ -25379,11 +25379,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-76aee6f3-20240926" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-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-native-fb-76aee6f3-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-native-fb-67fee58b-20240926\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25420,11 +25420,11 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926"
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -25884,7 +25884,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<5740e9ceae85df41acb816777857969c>>
* @generated SignedSource<<d1128bd319a99cb9bbdec490ab245687>>
*/

/*
Expand Down Expand Up @@ -15628,14 +15628,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1679 = React.version;
if (
"19.0.0-native-fb-76aee6f3-20240926" !==
"19.0.0-native-fb-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1679
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1679,
"19.0.0-native-fb-76aee6f3-20240926"
"19.0.0-native-fb-67fee58b-20240926"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15657,11 +15657,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2134 = {
bundleType: 0,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926"
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2135 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -15919,4 +15919,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<868d03d4a4e8433f1b3ee30089e66920>>
* @generated SignedSource<<a4907f8f7a918f3fd3c1c3dc12fe73e3>>
*/

/*
Expand Down Expand Up @@ -16287,14 +16287,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1769 = React.version;
if (
"19.0.0-native-fb-76aee6f3-20240926" !==
"19.0.0-native-fb-67fee58b-20240926" !==
isomorphicReactPackageVersion$jscomp$inline_1769
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1769,
"19.0.0-native-fb-76aee6f3-20240926"
"19.0.0-native-fb-67fee58b-20240926"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16316,11 +16316,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1776 = {
bundleType: 0,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getClosestInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926",
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$286 = 0;
Expand Down Expand Up @@ -16593,7 +16593,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<06455e69dcfab26cfbb94de5c9f31c2b>>
* @generated SignedSource<<395751b4b29cd6c3bb3652777c61d60a>>
*/

"use strict";
Expand Down Expand Up @@ -15154,11 +15154,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926"
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -15303,5 +15303,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e6fe7c4c9515e1451b1341b9a16a1a54>>
* @generated SignedSource<<73a4c3b1e8586b0683841d39c5d2bcee>>
*/

"use strict";
Expand Down Expand Up @@ -9539,14 +9539,14 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1336 = {
bundleType: 0,
version: "19.0.0-native-fb-76aee6f3-20240926",
version: "19.0.0-native-fb-67fee58b-20240926",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function (mockNode) {
mockNode = nodeToInstanceMap.get(mockNode);
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
},
reconcilerVersion: "19.0.0-native-fb-76aee6f3-20240926"
reconcilerVersion: "19.0.0-native-fb-67fee58b-20240926"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1337 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -9682,4 +9682,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-76aee6f3-20240926";
exports.version = "19.0.0-native-fb-67fee58b-20240926";
Loading

0 comments on commit 342e45c

Please sign in to comment.