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

[Bug]: Hydration attribute mismatch in tabs component (SSR) #818

Closed
DamianGlowala opened this issue Apr 4, 2024 · 3 comments
Closed

[Bug]: Hydration attribute mismatch in tabs component (SSR) #818

DamianGlowala opened this issue Apr 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@DamianGlowala
Copy link
Contributor

Environment

- Operating System: Windows_NT
- Node Version:     v21.7.1
- Nuxt Version:     3.11.1
- CLI Version:      3.11.1
- Nitro Version:    2.9.6
- Package Manager:  [email protected]
- Builder:          -
- User Config:      devtools, modules
- Runtime Modules:  radix-vue/nuxt, @nuxtjs/[email protected]
- Build Modules:    -

Link to minimal reproduction

https://github.com/DamianGlowala/radix-vue-ssr-repro

Steps to reproduce

Load the page and observe logs in Chrome DevTools. I copied the default example provided on Radix Vue website.

Describe the bug

There are ID mismatches between server and client.

Expected behavior

No response

Context & Screenshots (if applicable)

No response

@DamianGlowala DamianGlowala added the bug Something isn't working label Apr 4, 2024
@DamianGlowala DamianGlowala changed the title [Bug]: Hydration attribute mismatch in tabs component [Bug]: Hydration attribute mismatch in tabs component (SSR) Apr 4, 2024
@zernonia
Copy link
Member

zernonia commented Apr 4, 2024

Yup becuase Vue doesn't have useId yet, thus we need to have a workaround for hydration issue, by utilziing useId from Nuxt and inject into component. Check out

https://www.radix-vue.com/utilities/config-provider.html#hydration-issue-vue-3-5

@zernonia
Copy link
Member

zernonia commented Apr 4, 2024

Related #577 (comment)

@DamianGlowala
Copy link
Contributor Author

Ah, was looking at the docs but not at the right place. Wish this was handled by the module under the hood 😄 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants