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]: Hydratation Hydration node mismatch. #710

Closed
SwartZCoding opened this issue Feb 23, 2024 · 2 comments
Closed

[Bug]: Hydratation Hydration node mismatch. #710

SwartZCoding opened this issue Feb 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SwartZCoding
Copy link

Environment

Developement/Production OS: Windows 10 19043.1110
Node version: 20.6.1
Package manager: npm
Radix Vue version: 1.4.6
Vue version: 3.4.19
Nuxt version: 3.10.0
Nuxt mode: universal
Nuxt target: server
CSS framework: tailwindcss

Link to minimal reproduction

https://stackblitz.com/edit/github-shdqqw?file=app.vue

Steps to reproduce

Encountered when using Modal, Tabs, Avatar etc.
This issue stay since a long time and it's very very boring.
Should be reproducible on any radix element which uses Primitive.

Describe the bug

When you use things, you got warning on console because id on client & server are different...

Expected behavior

Have the same id on 2 sides ^^.

Context & Screenshots (if applicable)

No response

@SwartZCoding SwartZCoding added the bug Something isn't working label Feb 23, 2024
@ChrisGV04
Copy link
Contributor

Hi @SwartZCoding! This is a duplicate of the pinned issue #577

I know, this is very annoying. However, right now this is an issue that exists because Vue itself does not have its own SSR-friendly composable for useId, which is why you get different id's on server and client hydrations.

Nuxt recently added useId officially, which is SSR-friendly. But Radix Vue is not Nuxt specific, so it must adhere to the general Vue specifications.

Right now, this will continue happening but it should not cause real problems. It is planned that Vue 3.5 will officially support an SSR-friendly useId, so it will be fixed until then.

@zernonia
Copy link
Member

Closing so that we can track the issue here #577

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

3 participants