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

docs: warn directives must be registered on both server/client #22627

Merged
merged 1 commit into from Aug 14, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #14568

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This adds a warning to the docs that directives need to be registered on both client/server

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@nuxt-studio
Copy link

nuxt-studio bot commented Aug 14, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio β†—οΈŽ View Live Preview 6793cfa

@danielroe danielroe changed the title docs: warn that directives must be registered on both server/client docs: warn directives must be registered on both server/client Aug 14, 2023
@danielroe danielroe merged commit 5492b06 into main Aug 14, 2023
3 checks passed
@danielroe danielroe deleted the docs/directives branch August 14, 2023 21:28
@github-actions github-actions bot mentioned this pull request Aug 14, 2023
@sadeghbarati
Copy link
Contributor

justintaddei/v-wave#351

getSSRProps(binding, vnode) {
    return {};
}

I see this workaround for SSR directives in Nuxt3, even if I add this workaround, I still have to create another directive on the server?

@danielroe
Copy link
Member Author

danielroe commented Aug 15, 2023

No, you don't have to create another directive. It's not a workaround either, it's just how Vue 3 directives work with SSR.

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.

document getSSRProps for directives
2 participants