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 (#32252)

followup to
* #32069
* #32163
* #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](a0fdb63)
  • Loading branch information
gnoff committed Feb 6, 2025
1 parent 2ca4fae commit 0b22ef9
Show file tree
Hide file tree
Showing 23 changed files with 574 additions and 506 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-b48e7399-20250206
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<<62f7075a95158f271aa4bcfd217c458e>>
* @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-b48e7399-20250206";
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<<f9d4e77e757ae66cbcb1d7414f754042>>
* @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-b48e7399-20250206";
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<<f9d4e77e757ae66cbcb1d7414f754042>>
* @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-b48e7399-20250206";
exports.version = "19.1.0-native-fb-a0fdb630-20250206";
Loading

0 comments on commit 0b22ef9

Please sign in to comment.