Commit 5637e8e
committed
[Fiber][Dev] Relax dom nesting validation when the root is a Document, 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)1 parent 6d25b6a commit 5637e8e
File tree
34 files changed
+422
-278
lines changed- compiled/facebook-www
34 files changed
+422
-278
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
1975 | | - | |
| 1975 | + | |
1976 | 1976 | | |
1977 | 1977 | | |
1978 | 1978 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
1975 | | - | |
| 1975 | + | |
1976 | 1976 | | |
1977 | 1977 | | |
1978 | 1978 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17417 | 17417 | | |
17418 | 17418 | | |
17419 | 17419 | | |
17420 | | - | |
| 17420 | + | |
17421 | 17421 | | |
17422 | 17422 | | |
17423 | | - | |
| 17423 | + | |
17424 | 17424 | | |
17425 | 17425 | | |
17426 | 17426 | | |
| |||
17454 | 17454 | | |
17455 | 17455 | | |
17456 | 17456 | | |
17457 | | - | |
| 17457 | + | |
17458 | 17458 | | |
17459 | 17459 | | |
17460 | 17460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17189 | 17189 | | |
17190 | 17190 | | |
17191 | 17191 | | |
17192 | | - | |
| 17192 | + | |
17193 | 17193 | | |
17194 | 17194 | | |
17195 | | - | |
| 17195 | + | |
17196 | 17196 | | |
17197 | 17197 | | |
17198 | 17198 | | |
| |||
17226 | 17226 | | |
17227 | 17227 | | |
17228 | 17228 | | |
17229 | | - | |
| 17229 | + | |
17230 | 17230 | | |
17231 | 17231 | | |
17232 | 17232 | | |
| |||
0 commit comments