Add ReactDOMClient to ServerIntegration(Hooks|NewContext) (#28135)

## Overview

Branched off https://github.com/facebook/react/pull/28130

### ~Failing~ Fixed by @eps1lon
Most of the tests pass, but there are 3 tests that have additional
warnings due to client render error retries.

For example, before we would log:

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
```

And now we log

```
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
Warning: Expected server HTML to contain a matching text node for "0" in <div>.
Warning: Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks.
```

We can't just update the expected error count for these tests, because
the additional error only happens on the client. So I need some guidance
on how to fix these.

---------

Co-authored-by: Sebastian Silbermann <sebastian.silbermann@klarna.com>

DiffTrain build for commit https://github.com/facebook/react/commit/fa6674b5bcf52610e92d19a5105308e56091c386.
This commit is contained in:
rickhanlonii
2024-02-01 23:37:02 +00:00
co-authored by Sebastian Silbermann
parent e5162748dd
commit bdb7f3383a
7 changed files with 9 additions and 9 deletions
@@ -25622,7 +25622,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-canary-278199b3d-20240201";
var ReactVersion = "18.3.0-canary-fa6674b5b-20240201";
// Might add PROFILE later.
@@ -9149,7 +9149,7 @@ var devToolsConfig$jscomp$inline_1031 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-278199b3d-20240201",
version: "18.3.0-canary-fa6674b5b-20240201",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1207 = {
@@ -9180,7 +9180,7 @@ var internals$jscomp$inline_1207 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-278199b3d-20240201"
reconcilerVersion: "18.3.0-canary-fa6674b5b-20240201"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1208 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9577,7 +9577,7 @@ var devToolsConfig$jscomp$inline_1073 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-278199b3d-20240201",
version: "18.3.0-canary-fa6674b5b-20240201",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1248 = {
@@ -9608,7 +9608,7 @@ var internals$jscomp$inline_1248 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-278199b3d-20240201"
reconcilerVersion: "18.3.0-canary-fa6674b5b-20240201"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1249 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-canary-278199b3d-20240201";
var ReactVersion = "18.3.0-canary-fa6674b5b-20240201";
// ATTENTION
// When adding new symbols to this file,
@@ -545,4 +545,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-278199b3d-20240201";
exports.version = "18.3.0-canary-fa6674b5b-20240201";
@@ -541,7 +541,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-278199b3d-20240201";
exports.version = "18.3.0-canary-fa6674b5b-20240201";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
278199b3deeee73f969a242c777c2d38406f8bfe
fa6674b5bcf52610e92d19a5105308e56091c386