-
-
Notifications
You must be signed in to change notification settings - Fork 233
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 errors after upgrading to Nuxt 3.9.0 and Vue 3.4.0 #577
Comments
Please see : #558 |
Thanks! |
There is new composable in Nuxt about this issue called |
Yup @adirizky54 ! Atinux mentioned that to us but we want to have framework agnositc composable. This way anyone using FYI |
I am getting the hydration mismatch warnings in the console for pretty much all the Radix components that use an id internally. You are saying we have to just wait until vue releases their useId composable, correct? @zernonia |
Hey guys! With v1.5, we've added a workaround for the hydration issue that happened in Nuxt. <!-- in Nuxt's app.vue -->
<script setup lang="ts">
import { ConfigProvider } from 'radix-vue'
const useIdFunction = () => useId()
</script>
<template>
<ConfigProvider :use-id="useIdFunction">
…
</ConfigProvider>
</template> |
Wonderfull ! 🚀 |
Previously, a hydration mismatch caused by differing IDs within radix-vue was making the UI unusable. Although hydration mismatches still appear to occur, the UI appears to be functional with this workaround. Related to: unovue/radix-vue#577
Thanks, my problems has been solved. |
@sabiqhasby, by solved, do you mean the warnings no longer show up, or is the UI functional with the warning still visible in the console? |
What if we use another Css Framework for style, for example UIkit and faced hygratation mismatch errors? |
Ok, so my dumb mistake, i did not put my |
@zernonia this error still happening with Navigation Menu using NuxtLinks the ConfigProvider useId fix doesnt seem to help |
@michaelsieminski can you share a minimal reproduction please? 🙏🏻 |
I have realized the example in the docs was just wrong as it was using 2 a tags, so I made a PR here: unovue/shadcn-vue#702 |
Environment
Link to minimal reproduction
https://stackblitz.com/edit/github-shdqqw?file=app.vue
Steps to reproduce
Encountered when using Collapsible, Tabs, Toggles etc.
Should be reproducible on any radix element which uses Primitive under the hood.
Describe the bug
This has already reported in few places,
nuxt/nuxt#24994
nuxt/ui#1171
Maybe the current native useId implementation is messed up after the vue update? (nuxt/nuxt#23368)
Expected behavior
No response
Context & Screenshots (if applicable)
No response
The text was updated successfully, but these errors were encountered: