[Flight][Fizz][Fiber] Chain HostDispatcher implementations (#28488)

The idea here is that host dispatchers are not bound to renders so we
need to be able to dispatch to them at any time. This updates the
implementation to chain these dispatchers so that each renderer can
respond to the dispatch. Semantically we don't always want every
renderer to do this for instance if Fizz handles a float method we don't
want Fiber to as well so each dispatcher implementation can decide if it
makes sense to forward the call or not. For float methods server
disaptchers will handle the call if they can resolve a Request otherwise
they will forward. For client dispatchers they will handle the call and
always forward. The choice needs to be made for each dispatcher method
and may have implications on correct renderer import order. For now we
just live with the restriction that if you want to use server and client
together (such as renderToString in the browser) you need to import the
server renderer after the client renderer.

DiffTrain build for commit https://github.com/facebook/react/commit/113ab9af08c46e8a548a397154f5c9dfeb96ab6a.
This commit is contained in:
gnoff
2024-03-04 20:30:53 +00:00
parent 7a7b277b12
commit 73fd2ce60f
7 changed files with 9 additions and 9 deletions
@@ -25733,7 +25733,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-canary-1c02b9d2b-20240304";
var ReactVersion = "18.3.0-canary-113ab9af0-20240304";
// Might add PROFILE later.
@@ -9173,7 +9173,7 @@ var devToolsConfig$jscomp$inline_1014 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-1c02b9d2b-20240304",
version: "18.3.0-canary-113ab9af0-20240304",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1195 = {
@@ -9204,7 +9204,7 @@ var internals$jscomp$inline_1195 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-1c02b9d2b-20240304"
reconcilerVersion: "18.3.0-canary-113ab9af0-20240304"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1196 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9601,7 +9601,7 @@ var devToolsConfig$jscomp$inline_1056 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-1c02b9d2b-20240304",
version: "18.3.0-canary-113ab9af0-20240304",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1236 = {
@@ -9632,7 +9632,7 @@ var internals$jscomp$inline_1236 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-1c02b9d2b-20240304"
reconcilerVersion: "18.3.0-canary-113ab9af0-20240304"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1237 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -26,7 +26,7 @@ if (__DEV__) {
}
var dynamicFlags = require("ReactNativeInternalFeatureFlags");
var ReactVersion = "18.3.0-canary-1c02b9d2b-20240304";
var ReactVersion = "18.3.0-canary-113ab9af0-20240304";
// ATTENTION
// When adding new symbols to this file,
@@ -598,4 +598,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-1c02b9d2b-20240304";
exports.version = "18.3.0-canary-113ab9af0-20240304";
@@ -594,7 +594,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-1c02b9d2b-20240304";
exports.version = "18.3.0-canary-113ab9af0-20240304";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
1c02b9d2bdc18091cc6afec810fc1b361f00abdd
113ab9af08c46e8a548a397154f5c9dfeb96ab6a