Commit b04254f
authored
Don't try to hydrate a hidden Offscreen tree (#32862)
I found a bug even before the Activity hydration stuff.
If we're hydrating an Offscreen boundary in its "hidden" state it won't
have any content to hydrate so will trigger hydration errors (which are
then eaten by the Offscreen boundary itself). Leaving it not prewarmed.
This doesn't happen in the simple case because we'd be hydrating at a
higher priority than Offscreen at the root, and those are deferred to
Offscreen by not having higher priority. However, we've hydrating at the
Offscreen priority, which we do inside Suspense boundaries, then it
tries to hydrate against an empty set.
I ended up moving this to the Activity boundary in a future PR since
it's the SSR side that decided where to not render something and it only
has a concept of Activity, no Offscreen.
1dc05a5#diff-d5166797ebbc5b646a49e6a06a049330ca617985d7a6edf3ad1641b43fde1ddfR11111 parent 539bbdb commit b04254f
File tree
2 files changed
+49
-1
lines changed- packages
- react-dom/src/__tests__
- react-reconciler/src
2 files changed
+49
-1
lines changedLines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3723 | 3723 | | |
3724 | 3724 | | |
3725 | 3725 | | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
3726 | 3731 | | |
3727 | 3732 | | |
3728 | 3733 | | |
| |||
3743 | 3748 | | |
3744 | 3749 | | |
3745 | 3750 | | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
3746 | 3755 | | |
3747 | 3756 | | |
3748 | 3757 | | |
| |||
3758 | 3767 | | |
3759 | 3768 | | |
3760 | 3769 | | |
| 3770 | + | |
3761 | 3771 | | |
3762 | 3772 | | |
3763 | 3773 | | |
| |||
3766 | 3776 | | |
3767 | 3777 | | |
3768 | 3778 | | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| 3783 | + | |
| 3784 | + | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
3769 | 3810 | | |
3770 | 3811 | | |
3771 | 3812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
716 | 723 | | |
717 | 724 | | |
718 | 725 | | |
| |||
0 commit comments