Skip to content

Commit

Permalink
[Flight] Client and Server Reference Creation into Runtime (#27033)
Browse files Browse the repository at this point in the history
We already did this for Server References on the Client so this brings
us parity with that. This gives us some more flexibility with changing
the runtime implementation without having to affect the loaders.

We can also do more in the runtime such as adding `.bind()` support to
Server References.

I also moved the CommonJS Proxy creation into the runtime helper from
the register so that it can be handled in one place.

This lets us remove the forks from Next.js since the loaders can be
simplified there to just use these helpers.

This PR doesn't change the protocol or shape of the objects. They're
still specific to each bundler but ideally we should probably move this
to shared helpers that can be used by multiple bundler implementations.

DiffTrain build for commit fdc8c81.
  • Loading branch information
sebmarkbage committed Jul 7, 2023
1 parent 4880e36 commit f8d29c2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23982,7 +23982,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-eb2c2f7c2-20230706";
var ReactVersion = "18.3.0-canary-fdc8c81e0-20230707";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8630,7 +8630,7 @@ var devToolsConfig$jscomp$inline_1032 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-eb2c2f7c2-20230706",
version: "18.3.0-canary-fdc8c81e0-20230707",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1231 = {
Expand Down Expand Up @@ -8661,7 +8661,7 @@ var internals$jscomp$inline_1231 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-eb2c2f7c2-20230706"
reconcilerVersion: "18.3.0-canary-fdc8c81e0-20230707"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1232 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9056,7 +9056,7 @@ var devToolsConfig$jscomp$inline_1074 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-eb2c2f7c2-20230706",
version: "18.3.0-canary-fdc8c81e0-20230707",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1272 = {
Expand Down Expand Up @@ -9087,7 +9087,7 @@ var internals$jscomp$inline_1272 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-eb2c2f7c2-20230706"
reconcilerVersion: "18.3.0-canary-fdc8c81e0-20230707"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1273 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-canary-eb2c2f7c2-20230706";
var ReactVersion = "18.3.0-canary-fdc8c81e0-20230707";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-eb2c2f7c2-20230706";
exports.version = "18.3.0-canary-fdc8c81e0-20230707";
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-eb2c2f7c2-20230706";
exports.version = "18.3.0-canary-fdc8c81e0-20230707";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eb2c2f7c2cf2652a168c2b433d2989131c69754b
fdc8c81e07e9b3b49604afe524ee6d130fd3e03e

0 comments on commit f8d29c2

Please sign in to comment.