Skip to content

Commit 14213c5

Browse files
committed
Warn for useFormState on initial render (#30292)
This was missed in the mount dev dispatcher. It was only in the rerender dispatcher which means that it was only logged during the rerender. Since DevTools can hide logs during rerenders, this hid the warning in StrictMode. DiffTrain build for [274c980](274c980)
1 parent d255e1a commit 14213c5

34 files changed

+90
-80
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
df783f9ea1b6f95e05f830602da1de5ffb325d30
1+
274c980c535bb34e17f5d97cc22ef4dd296ab413
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
df783f9ea1b6f95e05f830602da1de5ffb325d30
1+
274c980c535bb34e17f5d97cc22ef4dd296ab413

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1998,7 +1998,7 @@ __DEV__ &&
19981998
exports.useTransition = function () {
19991999
return resolveDispatcher().useTransition();
20002000
};
2001-
exports.version = "19.0.0-www-classic-df783f9ea1-20240708";
2001+
exports.version = "19.0.0-www-classic-274c980c53-20240708";
20022002
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
20032003
"function" ===
20042004
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1978,7 +1978,7 @@ __DEV__ &&
19781978
exports.useTransition = function () {
19791979
return resolveDispatcher().useTransition();
19801980
};
1981-
exports.version = "19.0.0-www-modern-df783f9ea1-20240708";
1981+
exports.version = "19.0.0-www-modern-274c980c53-20240708";
19821982
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19831983
"function" ===
19841984
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,4 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-classic-df783f9ea1-20240708";
672+
exports.version = "19.0.0-www-classic-274c980c53-20240708";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,4 +669,4 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-modern-df783f9ea1-20240708";
672+
exports.version = "19.0.0-www-modern-274c980c53-20240708";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ exports.useSyncExternalStore = function (
673673
exports.useTransition = function () {
674674
return ReactSharedInternals.H.useTransition();
675675
};
676-
exports.version = "19.0.0-www-classic-df783f9ea1-20240708";
676+
exports.version = "19.0.0-www-classic-274c980c53-20240708";
677677
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
678678
"function" ===
679679
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ exports.useSyncExternalStore = function (
673673
exports.useTransition = function () {
674674
return ReactSharedInternals.H.useTransition();
675675
};
676-
exports.version = "19.0.0-www-modern-df783f9ea1-20240708";
676+
exports.version = "19.0.0-www-modern-274c980c53-20240708";
677677
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
678678
"function" ===
679679
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15517,6 +15517,7 @@ __DEV__ &&
1551715517
HooksDispatcherOnMountInDEV.useFormState = function (action, initialState) {
1551815518
currentHookNameInDev = "useFormState";
1551915519
mountHookTypesDev();
15520+
warnOnUseFormStateInDev();
1552015521
return mountActionState(action, initialState);
1552115522
};
1552215523
HooksDispatcherOnMountInDEV.useActionState = function (
@@ -16941,14 +16942,14 @@ __DEV__ &&
1694116942
scheduleRoot: scheduleRoot,
1694216943
setRefreshHandler: setRefreshHandler,
1694316944
getCurrentFiber: getCurrentFiberForDevTools,
16944-
reconcilerVersion: "19.0.0-www-classic-df783f9ea1-20240708"
16945+
reconcilerVersion: "19.0.0-www-classic-274c980c53-20240708"
1694516946
});
1694616947
})({
1694716948
findFiberByHostInstance: function () {
1694816949
return null;
1694916950
},
1695016951
bundleType: 1,
16951-
version: "19.0.0-www-classic-df783f9ea1-20240708",
16952+
version: "19.0.0-www-classic-274c980c53-20240708",
1695216953
rendererPackageName: "react-art"
1695316954
});
1695416955
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14949,6 +14949,7 @@ __DEV__ &&
1494914949
HooksDispatcherOnMountInDEV.useFormState = function (action, initialState) {
1495014950
currentHookNameInDev = "useFormState";
1495114951
mountHookTypesDev();
14952+
warnOnUseFormStateInDev();
1495214953
return mountActionState(action, initialState);
1495314954
};
1495414955
HooksDispatcherOnMountInDEV.useActionState = function (
@@ -16371,14 +16372,14 @@ __DEV__ &&
1637116372
scheduleRoot: scheduleRoot,
1637216373
setRefreshHandler: setRefreshHandler,
1637316374
getCurrentFiber: getCurrentFiberForDevTools,
16374-
reconcilerVersion: "19.0.0-www-modern-df783f9ea1-20240708"
16375+
reconcilerVersion: "19.0.0-www-modern-274c980c53-20240708"
1637516376
});
1637616377
})({
1637716378
findFiberByHostInstance: function () {
1637816379
return null;
1637916380
},
1638016381
bundleType: 1,
16381-
version: "19.0.0-www-modern-df783f9ea1-20240708",
16382+
version: "19.0.0-www-modern-274c980c53-20240708",
1638216383
rendererPackageName: "react-art"
1638316384
});
1638416385
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,

0 commit comments

Comments
 (0)