-
Notifications
You must be signed in to change notification settings - Fork 47.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily treat Offscreen as fragment during SSR
Offscreen isn't as implemented for server rendering yet. Currently Fizz doesn't even recognize the component type, so it errors and reverts the nearest Suspense boundary to client rendering. This commit doesn't fully implement Offscreen — all it does is add the element type to Fizz so that it doesn't deopt its surroundings. When the tree is visible, it acts like a fragment, with no caveats. When the tree is hidden, Fizz will fail to hide the nearest HTML nodes. Then during hydration the hidden tree gets deleted. The eventual, desired behavior is for Fizz to treat Offscreen as another kind of hydration boundary, similar to how Suspense works during hydration.
- Loading branch information
Showing
2 changed files
with
126 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters