Skip to content

Commit f291455

Browse files
committed
useFormState fix: action -> target (#27309)
I mixed these attributes up in facebook/react#27302 DiffTrain build for [2fba484cd095ea79b940364cea5107fa4ca9f0c8](facebook/react@2fba484)
1 parent f8fd17a commit f291455

7 files changed

+14
-14
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ddff504695f33c19e8c0792bff82bd8f8b8f7c05
1+
2fba484cd095ea79b940364cea5107fa4ca9f0c8

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-classic-0ebcd846";
22+
var ReactVersion = "18.3.0-www-classic-b66d17d9";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");
@@ -9616,14 +9616,14 @@ function useFormState(action, initialState, permalink) {
96169616
// $FlowIgnore[prop-missing]
96179617
dispatch.$$FORM_ACTION = function (prefix) {
96189618
// $FlowIgnore[prop-missing]
9619-
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the target URL
9619+
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL
96209620

96219621
if (permalink !== undefined) {
96229622
{
96239623
checkAttributeStringCoercion(permalink, "target");
96249624
}
96259625

9626-
metadata.target = permalink + "";
9626+
metadata.action = permalink + "";
96279627
}
96289628

96299629
return metadata;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-modern-528c5df7";
22+
var ReactVersion = "18.3.0-www-modern-a9c5f511";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");
@@ -9375,14 +9375,14 @@ function useFormState(action, initialState, permalink) {
93759375
// $FlowIgnore[prop-missing]
93769376
dispatch.$$FORM_ACTION = function (prefix) {
93779377
// $FlowIgnore[prop-missing]
9378-
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the target URL
9378+
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL
93799379

93809380
if (permalink !== undefined) {
93819381
{
93829382
checkAttributeStringCoercion(permalink, "target");
93839383
}
93849384

9385-
metadata.target = permalink + "";
9385+
metadata.action = permalink + "";
93869386
}
93879387

93889388
return metadata;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ function useFormState(action, initialState, permalink) {
27862786
"function" === typeof boundAction.$$FORM_ACTION &&
27872787
(dispatch.$$FORM_ACTION = function (prefix) {
27882788
prefix = boundAction.$$FORM_ACTION(prefix);
2789-
void 0 !== permalink && (prefix.target = permalink + "");
2789+
void 0 !== permalink && (prefix.action = permalink + "");
27902790
return prefix;
27912791
});
27922792
return [initialState, dispatch];
@@ -4415,4 +4415,4 @@ exports.renderToString = function (children, options) {
44154415
'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'
44164416
);
44174417
};
4418-
exports.version = "18.3.0-www-classic-31e5c37c";
4418+
exports.version = "18.3.0-www-classic-d7739767";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2778,7 +2778,7 @@ function useFormState(action, initialState, permalink) {
27782778
"function" === typeof boundAction.$$FORM_ACTION &&
27792779
(dispatch.$$FORM_ACTION = function (prefix) {
27802780
prefix = boundAction.$$FORM_ACTION(prefix);
2781-
void 0 !== permalink && (prefix.target = permalink + "");
2781+
void 0 !== permalink && (prefix.action = permalink + "");
27822782
return prefix;
27832783
});
27842784
return [initialState, dispatch];
@@ -4398,4 +4398,4 @@ exports.renderToString = function (children, options) {
43984398
'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'
43994399
);
44004400
};
4401-
exports.version = "18.3.0-www-modern-03f0f7fc";
4401+
exports.version = "18.3.0-www-modern-eac21e34";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9281,14 +9281,14 @@ function useFormState(action, initialState, permalink) {
92819281
// $FlowIgnore[prop-missing]
92829282
dispatch.$$FORM_ACTION = function (prefix) {
92839283
// $FlowIgnore[prop-missing]
9284-
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the target URL
9284+
var metadata = boundAction.$$FORM_ACTION(prefix); // Override the action URL
92859285

92869286
if (permalink !== undefined) {
92879287
{
92889288
checkAttributeStringCoercion(permalink, "target");
92899289
}
92909290

9291-
metadata.target = permalink + "";
9291+
metadata.action = permalink + "";
92929292
}
92939293

92949294
return metadata;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2634,7 +2634,7 @@ function useFormState(action, initialState, permalink) {
26342634
"function" === typeof boundAction.$$FORM_ACTION &&
26352635
(dispatch.$$FORM_ACTION = function (prefix) {
26362636
prefix = boundAction.$$FORM_ACTION(prefix);
2637-
void 0 !== permalink && (prefix.target = permalink + "");
2637+
void 0 !== permalink && (prefix.action = permalink + "");
26382638
return prefix;
26392639
});
26402640
return [initialState, dispatch];

0 commit comments

Comments
 (0)