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

Fix Suspense breakage due to a synchronous setState on mount #12291

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nick-potts
Copy link

@nick-potts nick-potts commented Jun 21, 2024

Fixes #12272

Currently hydration is broken inside a <AppProvider> when it has a long running promise being resolved. This is due to the setState on mount.

A startTransition resolves the issue.

See this repro repo: https://github.com/nick-potts/app-provider-remix-demo/blob/main/app/routes/broken.tsx

@github-actions github-actions bot added the cla-needed Added by a bot. Contributor needs to sign the CLA Agreement. label Jun 21, 2024
@nick-potts
Copy link
Author

I have signed the CLA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught Error: This Suspense boundary received an update before it finished hydrating.
1 participant