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 recursive hydration of next/dynamic #6326

Merged
merged 4 commits into from
Feb 17, 2019

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Feb 17, 2019

Fixes #5347

The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of preload) but it would then show a hydration warning in development.

Thanks to @arthens for providing the reproduction that I modelled the tests after.

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I know what this code is doing enough to approve it. 😄

@timneutkens timneutkens merged commit dd9811b into vercel:canary Feb 17, 2019
@timneutkens timneutkens deleted the fix/dynamic-hydration branch February 17, 2019 18:52
@lock lock bot locked as resolved and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested dynamic components produce a react warning
3 participants