Skip to content

Commit 0fa1c02

Browse files
committed
[Fiber][Dev] Relax dom nesting validation when the root is a Document, html tag, or body tag (facebook#32252)
followup to * facebook#32069 * facebook#32163 * facebook#32224 in react-dom in Dev we validate that the tag nesting is valid. This is motivated primarily because while browsers are tolerant to poor HTML there are many cases that if server rendered will be hydrated in a way that will break hydration. With the changes to singleton scoping where the document body is now the implicit render/hydration context for arbitrary tags at the root we need to adjust the validation logic to allow for valid programs such as rendering divs as a child of a Document (since this div will actually insert into the body). DiffTrain build for [a0fdb63](facebook@a0fdb63)
1 parent 7ff3c48 commit 0fa1c02

23 files changed

+592
-512
lines changed

compiled-rn/VERSION_NATIVE_FB

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.1.0-native-fb-ff628334-20250205
1+
19.1.0-native-fb-a0fdb630-20250206

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<cbd289e323f7a8415dbd55fd449a4cb3>>
10+
* @generated SignedSource<<92aea63822421f43b7e4c32d35ac0827>>
1111
*/
1212

1313
"use strict";
@@ -428,5 +428,5 @@ __DEV__ &&
428428
exports.useFormStatus = function () {
429429
return resolveDispatcher().useHostTransitionStatus();
430430
};
431-
exports.version = "19.1.0-native-fb-ff628334-20250205";
431+
exports.version = "19.1.0-native-fb-a0fdb630-20250206";
432432
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<76039a6de37b6ad225a095a4d8a23b62>>
10+
* @generated SignedSource<<8c9961cd4f1eb1a31b1660669f11c578>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-ff628334-20250205";
206+
exports.version = "19.1.0-native-fb-a0fdb630-20250206";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<76039a6de37b6ad225a095a4d8a23b62>>
10+
* @generated SignedSource<<8c9961cd4f1eb1a31b1660669f11c578>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.1.0-native-fb-ff628334-20250205";
206+
exports.version = "19.1.0-native-fb-a0fdb630-20250206";

0 commit comments

Comments
 (0)