[Fizz] Allow an action provide a custom set of props to use for progressive enhancement (#26749)

Stacked on top of #26735.

This allows a framework to add a `$$FORM_ACTION` property to a function.
This lets the framework return a set of props to use in place of the
function but only during SSR. Effectively, this lets you implement
progressive enhancement of form actions using some other way instead of
relying on the replay feature.

This will be used by RSC on Server References automatically by
convention in a follow up, but this mechanism can also be used by other
frameworks/libraries.

DiffTrain build for commit https://github.com/facebook/react/commit/559e83aebb2026035d47aa0ebf842f78d4cd6757.
This commit is contained in:
sebmarkbage
2023-05-01 20:05:59 +00:00
parent d68b8069e3
commit 2d12a6b0c2
13 changed files with 19 additions and 19 deletions
@@ -23918,7 +23918,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-67f4fb021-20230501";
var ReactVersion = "18.3.0-next-559e83aeb-20230501";
// Might add PROFILE later.
@@ -8623,7 +8623,7 @@ var devToolsConfig$jscomp$inline_1039 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-67f4fb021-20230501",
version: "18.3.0-next-559e83aeb-20230501",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1238 = {
@@ -8654,7 +8654,7 @@ var internals$jscomp$inline_1238 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-67f4fb021-20230501"
reconcilerVersion: "18.3.0-next-559e83aeb-20230501"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9049,7 +9049,7 @@ var devToolsConfig$jscomp$inline_1081 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-67f4fb021-20230501",
version: "18.3.0-next-559e83aeb-20230501",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1279 = {
@@ -9080,7 +9080,7 @@ var internals$jscomp$inline_1279 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-67f4fb021-20230501"
reconcilerVersion: "18.3.0-next-559e83aeb-20230501"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1280 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -27,7 +27,7 @@ if (
}
"use strict";
var ReactVersion = "18.3.0-next-67f4fb021-20230501";
var ReactVersion = "18.3.0-next-559e83aeb-20230501";
// ATTENTION
// When adding new symbols to this file,
@@ -645,4 +645,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-67f4fb021-20230501";
exports.version = "18.3.0-next-559e83aeb-20230501";
@@ -648,7 +648,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-67f4fb021-20230501";
exports.version = "18.3.0-next-559e83aeb-20230501";
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
@@ -1 +1 @@
67f4fb02130b1fe1856289e3b66bb0b8cca57ff7
559e83aebb2026035d47aa0ebf842f78d4cd6757
@@ -27228,7 +27228,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-67f4fb021-20230501";
var ReactVersion = "18.3.0-next-559e83aeb-20230501";
function createPortal$1(
children,
@@ -9490,7 +9490,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1063 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-67f4fb021-20230501",
version: "18.3.0-next-559e83aeb-20230501",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -9532,7 +9532,7 @@ var internals$jscomp$inline_1301 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-67f4fb021-20230501"
reconcilerVersion: "18.3.0-next-559e83aeb-20230501"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1302 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10199,7 +10199,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1141 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-67f4fb021-20230501",
version: "18.3.0-next-559e83aeb-20230501",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -10254,7 +10254,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-67f4fb021-20230501"
reconcilerVersion: "18.3.0-next-559e83aeb-20230501"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
@@ -27741,7 +27741,7 @@ function createFiberRoot(
return root;
}
var ReactVersion = "18.3.0-next-67f4fb021-20230501";
var ReactVersion = "18.3.0-next-559e83aeb-20230501";
function createPortal$1(
children,
@@ -9749,7 +9749,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1118 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-67f4fb021-20230501",
version: "18.3.0-next-559e83aeb-20230501",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -9791,7 +9791,7 @@ var internals$jscomp$inline_1370 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-67f4fb021-20230501"
reconcilerVersion: "18.3.0-next-559e83aeb-20230501"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1371 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10458,7 +10458,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1196 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-67f4fb021-20230501",
version: "18.3.0-next-559e83aeb-20230501",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
@@ -10513,7 +10513,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-67f4fb021-20230501"
reconcilerVersion: "18.3.0-next-559e83aeb-20230501"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {