Skip to content

Commit d73d694

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 5f6bd9c commit d73d694

34 files changed

+452
-288
lines changed

compiled/facebook-www/REVISION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ff6283340a10bb72ad0fb16ca027606a9ea1e67c
1+
a0fdb6306043b9f049106e58dcec107d8dbed2b1
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ff6283340a10bb72ad0fb16ca027606a9ea1e67c
1+
a0fdb6306043b9f049106e58dcec107d8dbed2b1

compiled/facebook-www/React-dev.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ __DEV__ &&
19721972
exports.useTransition = function () {
19731973
return resolveDispatcher().useTransition();
19741974
};
1975-
exports.version = "19.1.0-www-classic-ff628334-20250205";
1975+
exports.version = "19.1.0-www-classic-a0fdb630-20250206";
19761976
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19771977
"function" ===
19781978
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1972,7 +1972,7 @@ __DEV__ &&
19721972
exports.useTransition = function () {
19731973
return resolveDispatcher().useTransition();
19741974
};
1975-
exports.version = "19.1.0-www-modern-ff628334-20250205";
1975+
exports.version = "19.1.0-www-modern-a0fdb630-20250206";
19761976
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19771977
"function" ===
19781978
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.1.0-www-classic-ff628334-20250205";
642+
exports.version = "19.1.0-www-classic-a0fdb630-20250206";

compiled/facebook-www/React-prod.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
639639
exports.useTransition = function () {
640640
return ReactSharedInternals.H.useTransition();
641641
};
642-
exports.version = "19.1.0-www-modern-ff628334-20250205";
642+
exports.version = "19.1.0-www-modern-a0fdb630-20250206";

compiled/facebook-www/React-profiling.classic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ exports.useSyncExternalStore = function (
643643
exports.useTransition = function () {
644644
return ReactSharedInternals.H.useTransition();
645645
};
646-
exports.version = "19.1.0-www-classic-ff628334-20250205";
646+
exports.version = "19.1.0-www-classic-a0fdb630-20250206";
647647
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
648648
"function" ===
649649
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ exports.useSyncExternalStore = function (
643643
exports.useTransition = function () {
644644
return ReactSharedInternals.H.useTransition();
645645
};
646-
exports.version = "19.1.0-www-modern-ff628334-20250205";
646+
exports.version = "19.1.0-www-modern-a0fdb630-20250206";
647647
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
648648
"function" ===
649649
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17417,10 +17417,10 @@ __DEV__ &&
1741717417
(function () {
1741817418
var internals = {
1741917419
bundleType: 1,
17420-
version: "19.1.0-www-classic-ff628334-20250205",
17420+
version: "19.1.0-www-classic-a0fdb630-20250206",
1742117421
rendererPackageName: "react-art",
1742217422
currentDispatcherRef: ReactSharedInternals,
17423-
reconcilerVersion: "19.1.0-www-classic-ff628334-20250205"
17423+
reconcilerVersion: "19.1.0-www-classic-a0fdb630-20250206"
1742417424
};
1742517425
internals.overrideHookState = overrideHookState;
1742617426
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17454,7 +17454,7 @@ __DEV__ &&
1745417454
exports.Shape = Shape;
1745517455
exports.Surface = Surface;
1745617456
exports.Text = Text;
17457-
exports.version = "19.1.0-www-classic-ff628334-20250205";
17457+
exports.version = "19.1.0-www-classic-a0fdb630-20250206";
1745817458
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1745917459
"function" ===
1746017460
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -17189,10 +17189,10 @@ __DEV__ &&
1718917189
(function () {
1719017190
var internals = {
1719117191
bundleType: 1,
17192-
version: "19.1.0-www-modern-ff628334-20250205",
17192+
version: "19.1.0-www-modern-a0fdb630-20250206",
1719317193
rendererPackageName: "react-art",
1719417194
currentDispatcherRef: ReactSharedInternals,
17195-
reconcilerVersion: "19.1.0-www-modern-ff628334-20250205"
17195+
reconcilerVersion: "19.1.0-www-modern-a0fdb630-20250206"
1719617196
};
1719717197
internals.overrideHookState = overrideHookState;
1719817198
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17226,7 +17226,7 @@ __DEV__ &&
1722617226
exports.Shape = Shape;
1722717227
exports.Surface = Surface;
1722817228
exports.Text = Text;
17229-
exports.version = "19.1.0-www-modern-ff628334-20250205";
17229+
exports.version = "19.1.0-www-modern-a0fdb630-20250206";
1723017230
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1723117231
"function" ===
1723217232
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-prod.classic.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11275,10 +11275,10 @@ var slice = Array.prototype.slice,
1127511275
})(React.Component);
1127611276
var internals$jscomp$inline_1567 = {
1127711277
bundleType: 0,
11278-
version: "19.1.0-www-classic-ff628334-20250205",
11278+
version: "19.1.0-www-classic-a0fdb630-20250206",
1127911279
rendererPackageName: "react-art",
1128011280
currentDispatcherRef: ReactSharedInternals,
11281-
reconcilerVersion: "19.1.0-www-classic-ff628334-20250205"
11281+
reconcilerVersion: "19.1.0-www-classic-a0fdb630-20250206"
1128211282
};
1128311283
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1128411284
var hook$jscomp$inline_1568 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -11304,4 +11304,4 @@ exports.RadialGradient = RadialGradient;
1130411304
exports.Shape = TYPES.SHAPE;
1130511305
exports.Surface = Surface;
1130611306
exports.Text = Text;
11307-
exports.version = "19.1.0-www-classic-ff628334-20250205";
11307+
exports.version = "19.1.0-www-classic-a0fdb630-20250206";

compiled/facebook-www/ReactART-prod.modern.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10990,10 +10990,10 @@ var slice = Array.prototype.slice,
1099010990
})(React.Component);
1099110991
var internals$jscomp$inline_1540 = {
1099210992
bundleType: 0,
10993-
version: "19.1.0-www-modern-ff628334-20250205",
10993+
version: "19.1.0-www-modern-a0fdb630-20250206",
1099410994
rendererPackageName: "react-art",
1099510995
currentDispatcherRef: ReactSharedInternals,
10996-
reconcilerVersion: "19.1.0-www-modern-ff628334-20250205"
10996+
reconcilerVersion: "19.1.0-www-modern-a0fdb630-20250206"
1099710997
};
1099810998
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1099910999
var hook$jscomp$inline_1541 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -11019,4 +11019,4 @@ exports.RadialGradient = RadialGradient;
1101911019
exports.Shape = TYPES.SHAPE;
1102011020
exports.Surface = Surface;
1102111021
exports.Text = Text;
11022-
exports.version = "19.1.0-www-modern-ff628334-20250205";
11022+
exports.version = "19.1.0-www-modern-a0fdb630-20250206";

0 commit comments

Comments
 (0)