-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Allow Suspense Mismatch on the Client to Silently Proceed #16943
Merged
Conversation
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 fixes but isn't actually the semantics that we want this case to have.
acdlite
approved these changes
Sep 28, 2019
acdlite
pushed a commit
to acdlite/react
that referenced
this pull request
Sep 28, 2019
…6943) * Regression test: Suspense + hydration + legacy * Allow Suspense Mismatch on the Client to Silently Proceed This fixes but isn't actually the semantics that we want this case to have.
This was referenced Oct 6, 2019
Open
Open
This was referenced Apr 5, 2020
This was referenced Apr 14, 2020
This was referenced Apr 21, 2020
This was referenced May 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #16938 but isn't actually the semantics we want for this case.
As described in: #16938 (comment)
This would silently try to hydrate bad mismatches instead of gracefully regenerate the content on the client. Additionally, the only time the hack makes sense is if you can guarantee that nothing will possibly suspend during hydration. If it does, it opens up a whole new set of issues as the fallback would now try to hydrate.
So it's clear to me that we don't actually want this to be the semantics.
Now the debate is in whether it's ok to change this in a minor. We'd argue that it is because conditional rendering on the server is never considered a public API. E.g. if you conditionally render useLayoutEffect, Context providers or anything else, that's also not a legit usage. So technically we don't consider this a breaking change. Suspense was already erroring if used as intended - unconditionally.
However this is a technicality and it's really about what is the impact of this in practice.