Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Partial Hydration] Dehydrated suspense boundaries in SuspenseList #16369

Merged
merged 1 commit into from Aug 12, 2019

Conversation

sebmarkbage
Copy link
Collaborator

Builds on top of #16352 and #16359

If we get an insertion after a boundary, that has not yet been hydrated, we take our best guess at which state the HTML is showing.

isSuspenseInstancePending means that we're still waiting for more server HTML before we can hydrate. This should mean that we're showing the fallback state.

isSuspenseInstanceFallback means that we want to client render something. That most likely means that the server was unable to render and is displaying a fallback state in this slot.

Adds tests to ensure that dehydrated components don't consider the force flag set by suspense list. I.e. we should be able to hydrate something that is already showing content even though insertions are forced into fallback state.

@sizebot
Copy link

sizebot commented Aug 12, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

If we get an insertion after a boundary, that has not yet been hydrated,
we take our best guess at which state the HTML is showing.

isSuspenseInstancePending means that we're still waiting for more server
HTML before we can hydrate. This should mean that we're showing the
fallback state.

isSuspenseInstanceFallback means that we want to client render something.
That most likely means that the server was unable to render and is
displaying a fallback state in this slot.

Adds tests to ensure that dehydrated components don't consider the force
flag.
@sebmarkbage sebmarkbage merged commit a29adc9 into facebook:master Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants