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
Member

@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 Sep 28, 2019
This fixes but isn't actually the semantics that we want this case to have.
@sizebot
Copy link

@sizebot 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
13 checks passed
13 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: flow Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: lint_build Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_build Your tests passed on CircleCI!
Details
ci/circleci: test_build_devtools Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: test_source Your tests passed on CircleCI!
Details
ci/circleci: test_source_persistent Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod Your tests passed on CircleCI!
Details
acdlite added 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 of 3 tasks complete
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
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.