mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Flight] Allow custom encoding of the form action (#27563)
There are three parts to an RSC set up: - React - Bundler - Endpoints Most customizability is in the bundler configs. We deal with those as custom builds. To create a full set up, you need to also configure ways to expose end points for example to call a Server Action. That's typically not something the bundler is responsible for even though it's responsible for gathering the end points that needs generation. Exposing which endpoints to generate is a responsibility for the bundler. Typically a meta-framework is responsible for generating the end points. There's two ways to "call" a Server Action. Through JS and through a Form. Through JS we expose the `callServer` callback so that the framework can call the end point. Forms by default POST back to the current page with an action serialized into form data, which we have a decoder helper for. However, this is not something that React is really opinionated about just like we're not opinionated about the protocol used by callServer. This exposes an option to configure the encoding of the form props. `encodeFormAction` is to the SSR is what `callServer` is to the Browser. DiffTrain build for commit https://github.com/facebook/react/commit/8d48183291870898ec42ac1f84482d9d26789424.
This commit is contained in:
+1
-1
@@ -25917,7 +25917,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-canary-7a32d718b-20240212";
|
||||
var ReactVersion = "18.3.0-canary-8d4818329-20240212";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
+2
-2
@@ -9167,7 +9167,7 @@ var devToolsConfig$jscomp$inline_1025 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-7a32d718b-20240212",
|
||||
version: "18.3.0-canary-8d4818329-20240212",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1206 = {
|
||||
@@ -9198,7 +9198,7 @@ var internals$jscomp$inline_1206 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-7a32d718b-20240212"
|
||||
reconcilerVersion: "18.3.0-canary-8d4818329-20240212"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1207 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+2
-2
@@ -9595,7 +9595,7 @@ var devToolsConfig$jscomp$inline_1067 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "18.3.0-canary-7a32d718b-20240212",
|
||||
version: "18.3.0-canary-8d4818329-20240212",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1247 = {
|
||||
@@ -9626,7 +9626,7 @@ var internals$jscomp$inline_1247 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-canary-7a32d718b-20240212"
|
||||
reconcilerVersion: "18.3.0-canary-8d4818329-20240212"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1248 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ if (__DEV__) {
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = "18.3.0-canary-7a32d718b-20240212";
|
||||
var ReactVersion = "18.3.0-canary-8d4818329-20240212";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
|
||||
+1
-1
@@ -590,4 +590,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-7a32d718b-20240212";
|
||||
exports.version = "18.3.0-canary-8d4818329-20240212";
|
||||
|
||||
+1
-1
@@ -586,7 +586,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-canary-7a32d718b-20240212";
|
||||
exports.version = "18.3.0-canary-8d4818329-20240212";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
7a32d718b9ea0eb9ea86e9d21d56a5af6c4ce9ed
|
||||
8d48183291870898ec42ac1f84482d9d26789424
|
||||
|
||||
Reference in New Issue
Block a user