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

Allow Suspense Mismatch on the Client to Silently Proceed #16943

Merged
merged 2 commits into from
Sep 28, 2019

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Sep 28, 2019

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.

acdlite and others added 2 commits September 27, 2019 22:50
This fixes but isn't actually the semantics that we want this case to have.
@sizebot
Copy link

sizebot commented Sep 28, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS against 15ee6ca

@sebmarkbage sebmarkbage merged commit d8a76ad into facebook:master 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.
@acdlite acdlite mentioned this pull request Sep 28, 2019
3 tasks
This was referenced Oct 6, 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.

React 16.10 broke Next.js/SSR applications
4 participants