Skip to content

Commit

Permalink
[Fiber][Dev] Relax dom nesting validation when the root is a Document…
Browse files Browse the repository at this point in the history
…, 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)
  • Loading branch information
pull[bot] committed Feb 7, 2025
1 parent 7ff3c48 commit 0fa1c02
Show file tree
Hide file tree
Showing 23 changed files with 592 additions and 512 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.1.0-native-fb-ff628334-20250205
19.1.0-native-fb-a0fdb630-20250206
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<cbd289e323f7a8415dbd55fd449a4cb3>>
* @generated SignedSource<<92aea63822421f43b7e4c32d35ac0827>>
*/

"use strict";
Expand Down Expand Up @@ -428,5 +428,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-ff628334-20250205";
exports.version = "19.1.0-native-fb-a0fdb630-20250206";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<76039a6de37b6ad225a095a4d8a23b62>>
* @generated SignedSource<<8c9961cd4f1eb1a31b1660669f11c578>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-ff628334-20250205";
exports.version = "19.1.0-native-fb-a0fdb630-20250206";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<76039a6de37b6ad225a095a4d8a23b62>>
* @generated SignedSource<<8c9961cd4f1eb1a31b1660669f11c578>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-ff628334-20250205";
exports.version = "19.1.0-native-fb-a0fdb630-20250206";
Loading

0 comments on commit 0fa1c02

Please sign in to comment.