Skip to content

Commit

Permalink
Fix useResourceEffect in Fizz (#31758)
Browse files Browse the repository at this point in the history
We're seeing errors when testing useResourceEffect in SSR and it turns
out we're missing the noop dispatcher function on Fizz.

I tested a local build with this change and it resolved the late
mutation errors in the e2e tests.

DiffTrain build for [17ca4b1](17ca4b1)
  • Loading branch information
jackpope committed Dec 13, 2024
1 parent f0381ca commit 5b45911
Show file tree
Hide file tree
Showing 36 changed files with 101 additions and 86 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4dff0e62b2320d8c97746a16c95efd9c9ad0bc07
17ca4b157fcba6c734583513353ba72376a7ba2d
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4dff0e62b2320d8c97746a16c95efd9c9ad0bc07
17ca4b157fcba6c734583513353ba72376a7ba2d
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 @@ -1954,7 +1954,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
"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 @@ -1954,7 +1954,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
"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 @@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
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 @@ -635,4 +635,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
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 @@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
"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 @@ -639,7 +639,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
"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 @@ -17237,10 +17237,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-4dff0e62-20241213",
version: "19.1.0-www-classic-17ca4b15-20241213",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-classic-17ca4b15-20241213"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -17274,7 +17274,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
"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 @@ -17000,10 +17000,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-4dff0e62-20241213",
version: "19.1.0-www-modern-17ca4b15-20241213",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-modern-17ca4b15-20241213"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -17037,7 +17037,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
"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 @@ -10827,10 +10827,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1509 = {
bundleType: 0,
version: "19.1.0-www-classic-4dff0e62-20241213",
version: "19.1.0-www-classic-17ca4b15-20241213",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-classic-17ca4b15-20241213"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1510 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10856,4 +10856,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
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 @@ -10543,10 +10543,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1488 = {
bundleType: 0,
version: "19.1.0-www-modern-4dff0e62-20241213",
version: "19.1.0-www-modern-17ca4b15-20241213",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-modern-17ca4b15-20241213"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1489 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10572,4 +10572,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
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 @@ -27720,11 +27720,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-classic-4dff0e62-20241213" !== isomorphicReactPackageVersion)
if ("19.1.0-www-classic-17ca4b15-20241213" !== 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-4dff0e62-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-classic-17ca4b15-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27767,10 +27767,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-4dff0e62-20241213",
version: "19.1.0-www-classic-17ca4b15-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-classic-17ca4b15-20241213"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28377,7 +28377,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
"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 @@ -27499,11 +27499,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-modern-4dff0e62-20241213" !== isomorphicReactPackageVersion)
if ("19.1.0-www-modern-17ca4b15-20241213" !== 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-4dff0e62-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-modern-17ca4b15-20241213\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27546,10 +27546,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-4dff0e62-20241213",
version: "19.1.0-www-modern-17ca4b15-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-modern-17ca4b15-20241213"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28156,7 +28156,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
"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 @@ -17284,14 +17284,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1774 = React.version;
if (
"19.1.0-www-classic-4dff0e62-20241213" !==
"19.1.0-www-classic-17ca4b15-20241213" !==
isomorphicReactPackageVersion$jscomp$inline_1774
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1774,
"19.1.0-www-classic-4dff0e62-20241213"
"19.1.0-www-classic-17ca4b15-20241213"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17309,10 +17309,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2315 = {
bundleType: 0,
version: "19.1.0-www-classic-4dff0e62-20241213",
version: "19.1.0-www-classic-17ca4b15-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-classic-17ca4b15-20241213"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2316 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17677,4 +17677,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
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 @@ -17015,14 +17015,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1764 = React.version;
if (
"19.1.0-www-modern-4dff0e62-20241213" !==
"19.1.0-www-modern-17ca4b15-20241213" !==
isomorphicReactPackageVersion$jscomp$inline_1764
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1764,
"19.1.0-www-modern-4dff0e62-20241213"
"19.1.0-www-modern-17ca4b15-20241213"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17040,10 +17040,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2297 = {
bundleType: 0,
version: "19.1.0-www-modern-4dff0e62-20241213",
version: "19.1.0-www-modern-17ca4b15-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-modern-17ca4b15-20241213"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2298 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17408,4 +17408,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
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 @@ -17973,14 +17973,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1867 = React.version;
if (
"19.1.0-www-classic-4dff0e62-20241213" !==
"19.1.0-www-classic-17ca4b15-20241213" !==
isomorphicReactPackageVersion$jscomp$inline_1867
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1867,
"19.1.0-www-classic-4dff0e62-20241213"
"19.1.0-www-classic-17ca4b15-20241213"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17998,10 +17998,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1869 = {
bundleType: 0,
version: "19.1.0-www-classic-4dff0e62-20241213",
version: "19.1.0-www-classic-17ca4b15-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-classic-17ca4b15-20241213"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1869.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18369,7 +18369,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
"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 @@ -17703,14 +17703,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1857 = React.version;
if (
"19.1.0-www-modern-4dff0e62-20241213" !==
"19.1.0-www-modern-17ca4b15-20241213" !==
isomorphicReactPackageVersion$jscomp$inline_1857
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1857,
"19.1.0-www-modern-4dff0e62-20241213"
"19.1.0-www-modern-17ca4b15-20241213"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17728,10 +17728,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1859 = {
bundleType: 0,
version: "19.1.0-www-modern-4dff0e62-20241213",
version: "19.1.0-www-modern-17ca4b15-20241213",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-4dff0e62-20241213"
reconcilerVersion: "19.1.0-www-modern-17ca4b15-20241213"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1859.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18099,7 +18099,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-4dff0e62-20241213";
exports.version = "19.1.0-www-modern-17ca4b15-20241213";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
5 changes: 4 additions & 1 deletion compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -7693,6 +7693,8 @@ __DEV__ &&
dynamicFeatureFlags.disableLegacyContextForFunctionComponents,
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
enableUseResourceEffectHook =
dynamicFeatureFlags.enableUseResourceEffectHook,
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
enableOwnerStacks = dynamicFeatureFlags.enableOwnerStacks,
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
Expand Down Expand Up @@ -9082,6 +9084,7 @@ __DEV__ &&
};
HooksDispatcher.useFormState = useActionState;
HooksDispatcher.useActionState = useActionState;
enableUseResourceEffectHook && (HooksDispatcher.useResourceEffect = noop$1);
var currentResumableState = null,
currentTaskInDEV = null,
DefaultAsyncDispatcher = {
Expand Down Expand Up @@ -9161,5 +9164,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-4dff0e62-20241213";
exports.version = "19.1.0-www-classic-17ca4b15-20241213";
})();
Loading

0 comments on commit 5b45911

Please sign in to comment.