-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
perf(nuxt): prevent converting client only component setup to Promise #28334
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
Conversation
|
|
danielroe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way to add a regression test for this one?
|
@danielroe so with this fix, we still need to wait exactly 3 ticks until the client component is mounted. Should we instead advise users to use |
…m/nuxt/nuxt into perf/client-only-ignore-hydration
danielroe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
🔗 Linked issue
closes #27999
📚 Description
Hey 👋
This PR improve components from
createClientComponentif they are mounted after hydration. This bypass all code run specifically for hydration. Meaning the component will directly be returned if nuxt has already been hydrated.This PR also treeshake code that is not required server side