You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ReactDOMClient to ServerIntegrationSelect (#28132)
## Overview
Branched off #28130
## React for count changing
### Before
These tests are weird because on main they pass, but log to the console:
```
We expected 2 warning(s), but saw 1 warning(s).
We saw these warnings:
Warning: Expected server HTML to contain a matching <select> in <div>.
at select
```
The other one is ignored. The `expect(console.errors).toBeCalledWith(2)`
doesn't account for ignored calls, so the test passes with the two
expected (the +1 is in the test utiles). The ignored warning is
```
Warning: ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead.
```
So the mismatch is in the ignored warnings.
### After
After switching to `createRoot`, it still logs:
```
We expected 2 warning(s), but saw 1 warning(s).
We saw these warnings:
Warning: Expected server HTML to contain a matching <select> in <div>.
at select
```
But the test fails due to an unexpected error count. The new ignored
errors are:
```
Error: Uncaught [Error: Hydration failed because the initial UI does not match what was rendered on the server.]
Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.
Error: Hydration failed because the initial UI does not match what was rendered on the server.
Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.
```
These seem to be the correct warnings to fire in `createRoot`, so the
fix is to update the number of warnings we expect.
DiffTrain build for commit c42e7c7.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25622,7 +25622,7 @@ if (__DEV__) {
25622
25622
return root;
25623
25623
}
25624
25624
25625
-
var ReactVersion = "18.3.0-canary-6054be9c8-20240201";
25625
+
var ReactVersion = "18.3.0-canary-c42e7c7ad-20240201";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9149,7 +9149,7 @@ var devToolsConfig$jscomp$inline_1031 = {
9149
9149
throwError("TestRenderer does not support findFiberByHostInstance()");
9150
9150
},
9151
9151
bundleType: 0,
9152
-
version: "18.3.0-canary-6054be9c8-20240201",
9152
+
version: "18.3.0-canary-c42e7c7ad-20240201",
9153
9153
rendererPackageName: "react-test-renderer"
9154
9154
};
9155
9155
varinternals$jscomp$inline_1207={
@@ -9180,7 +9180,7 @@ var internals$jscomp$inline_1207 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9577,7 +9577,7 @@ var devToolsConfig$jscomp$inline_1073 = {
9577
9577
throwError("TestRenderer does not support findFiberByHostInstance()");
9578
9578
},
9579
9579
bundleType: 0,
9580
-
version: "18.3.0-canary-6054be9c8-20240201",
9580
+
version: "18.3.0-canary-c42e7c7ad-20240201",
9581
9581
rendererPackageName: "react-test-renderer"
9582
9582
};
9583
9583
varinternals$jscomp$inline_1248={
@@ -9608,7 +9608,7 @@ var internals$jscomp$inline_1248 = {
0 commit comments