Skip to content

Commit

Permalink
Clarify useActionState async non-transition warning (facebook#32207)
Browse files Browse the repository at this point in the history
  • Loading branch information
pull[bot] committed Jan 24, 2025
1 parent bef78ff commit 3d7a07d
Show file tree
Hide file tree
Showing 35 changed files with 97 additions and 97 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
de1eaa2655ee29933425695ae0af756bf6713147
b65afdd0c1f644f3630c4e8cfd9ac264c5ac329f
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
de1eaa2655ee29933425695ae0af756bf6713147
b65afdd0c1f644f3630c4e8cfd9ac264c5ac329f
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 @@ -1957,7 +1957,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
"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 @@ -1957,7 +1957,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
"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 @@ -630,4 +630,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
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 @@ -630,4 +630,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
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 @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
"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 @@ -634,7 +634,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3922,7 +3922,7 @@ __DEV__ &&
),
node.isTransition ||
error$jscomp$0(
"An async function was passed to useActionState, but it was dispatched outside of an action context. This is likely not what you intended. Either pass the dispatch function to an `action` prop, or dispatch manually inside `startTransition`"
"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
))
: onActionSuccess(actionQueue, node, returnValue);
}
Expand Down Expand Up @@ -16950,10 +16950,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-de1eaa26-20250124",
version: "19.1.0-www-classic-b65afdd0-20250124",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-classic-b65afdd0-20250124"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16987,7 +16987,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
8 changes: 4 additions & 4 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -3828,7 +3828,7 @@ __DEV__ &&
),
node.isTransition ||
error$jscomp$0(
"An async function was passed to useActionState, but it was dispatched outside of an action context. This is likely not what you intended. Either pass the dispatch function to an `action` prop, or dispatch manually inside `startTransition`"
"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
))
: onActionSuccess(actionQueue, node, returnValue);
}
Expand Down Expand Up @@ -16722,10 +16722,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-de1eaa26-20250124",
version: "19.1.0-www-modern-b65afdd0-20250124",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-modern-b65afdd0-20250124"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -16759,7 +16759,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
"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 @@ -10830,10 +10830,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1514 = {
bundleType: 0,
version: "19.1.0-www-classic-de1eaa26-20250124",
version: "19.1.0-www-classic-b65afdd0-20250124",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-classic-b65afdd0-20250124"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1515 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10859,4 +10859,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
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 @@ -10550,10 +10550,10 @@ var slice = Array.prototype.slice,
})(React.Component);
var internals$jscomp$inline_1487 = {
bundleType: 0,
version: "19.1.0-www-modern-de1eaa26-20250124",
version: "19.1.0-www-modern-b65afdd0-20250124",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-modern-b65afdd0-20250124"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1488 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand All @@ -10579,4 +10579,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
12 changes: 6 additions & 6 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -5806,7 +5806,7 @@ __DEV__ &&
),
node.isTransition ||
error$jscomp$0(
"An async function was passed to useActionState, but it was dispatched outside of an action context. This is likely not what you intended. Either pass the dispatch function to an `action` prop, or dispatch manually inside `startTransition`"
"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
))
: onActionSuccess(actionQueue, node, returnValue);
}
Expand Down Expand Up @@ -27436,11 +27436,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-classic-de1eaa26-20250124" !== isomorphicReactPackageVersion)
if ("19.1.0-www-classic-b65afdd0-20250124" !== 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-de1eaa26-20250124\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-classic-b65afdd0-20250124\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27483,10 +27483,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-classic-de1eaa26-20250124",
version: "19.1.0-www-classic-b65afdd0-20250124",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-classic-b65afdd0-20250124"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -28084,7 +28084,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
12 changes: 6 additions & 6 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -5693,7 +5693,7 @@ __DEV__ &&
),
node.isTransition ||
error$jscomp$0(
"An async function was passed to useActionState, but it was dispatched outside of an action context. This is likely not what you intended. Either pass the dispatch function to an `action` prop, or dispatch manually inside `startTransition`"
"An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
))
: onActionSuccess(actionQueue, node, returnValue);
}
Expand Down Expand Up @@ -27222,11 +27222,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-www-modern-de1eaa26-20250124" !== isomorphicReactPackageVersion)
if ("19.1.0-www-modern-b65afdd0-20250124" !== 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-de1eaa26-20250124\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-www-modern-b65afdd0-20250124\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27269,10 +27269,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-www-modern-de1eaa26-20250124",
version: "19.1.0-www-modern-b65afdd0-20250124",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-modern-b65afdd0-20250124"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -27870,7 +27870,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
"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 @@ -17308,14 +17308,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1798 = React.version;
if (
"19.1.0-www-classic-de1eaa26-20250124" !==
"19.1.0-www-classic-b65afdd0-20250124" !==
isomorphicReactPackageVersion$jscomp$inline_1798
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1798,
"19.1.0-www-classic-de1eaa26-20250124"
"19.1.0-www-classic-b65afdd0-20250124"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17333,10 +17333,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2330 = {
bundleType: 0,
version: "19.1.0-www-classic-de1eaa26-20250124",
version: "19.1.0-www-classic-b65afdd0-20250124",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-classic-b65afdd0-20250124"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2331 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17700,4 +17700,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
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 @@ -17044,14 +17044,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1788 = React.version;
if (
"19.1.0-www-modern-de1eaa26-20250124" !==
"19.1.0-www-modern-b65afdd0-20250124" !==
isomorphicReactPackageVersion$jscomp$inline_1788
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1788,
"19.1.0-www-modern-de1eaa26-20250124"
"19.1.0-www-modern-b65afdd0-20250124"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17069,10 +17069,10 @@ Internals.Events = [
];
var internals$jscomp$inline_2312 = {
bundleType: 0,
version: "19.1.0-www-modern-de1eaa26-20250124",
version: "19.1.0-www-modern-b65afdd0-20250124",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-modern-b65afdd0-20250124"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2313 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17436,4 +17436,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
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 @@ -17995,14 +17995,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1895 = React.version;
if (
"19.1.0-www-classic-de1eaa26-20250124" !==
"19.1.0-www-classic-b65afdd0-20250124" !==
isomorphicReactPackageVersion$jscomp$inline_1895
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1895,
"19.1.0-www-classic-de1eaa26-20250124"
"19.1.0-www-classic-b65afdd0-20250124"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -18020,10 +18020,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1897 = {
bundleType: 0,
version: "19.1.0-www-classic-de1eaa26-20250124",
version: "19.1.0-www-classic-b65afdd0-20250124",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-classic-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-classic-b65afdd0-20250124"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1897.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18390,7 +18390,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-classic-de1eaa26-20250124";
exports.version = "19.1.0-www-classic-b65afdd0-20250124";
"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 @@ -17730,14 +17730,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1885 = React.version;
if (
"19.1.0-www-modern-de1eaa26-20250124" !==
"19.1.0-www-modern-b65afdd0-20250124" !==
isomorphicReactPackageVersion$jscomp$inline_1885
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1885,
"19.1.0-www-modern-de1eaa26-20250124"
"19.1.0-www-modern-b65afdd0-20250124"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -17755,10 +17755,10 @@ Internals.Events = [
];
var internals$jscomp$inline_1887 = {
bundleType: 0,
version: "19.1.0-www-modern-de1eaa26-20250124",
version: "19.1.0-www-modern-b65afdd0-20250124",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-www-modern-de1eaa26-20250124"
reconcilerVersion: "19.1.0-www-modern-b65afdd0-20250124"
};
enableSchedulingProfiler &&
((internals$jscomp$inline_1887.getLaneLabelMap = getLaneLabelMap),
Expand Down Expand Up @@ -18125,7 +18125,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-www-modern-de1eaa26-20250124";
exports.version = "19.1.0-www-modern-b65afdd0-20250124";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit 3d7a07d

Please sign in to comment.