-
Notifications
You must be signed in to change notification settings - Fork 4
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
Problem in Vue / Nuxt - Hydration Children Mismatch #1494
Comments
Hey! Thanks for bringing this to our attention. You're correct, this is an issue with the The simple workaround here is to wrap your dialog in a <ClientOnly>
<Dialog as="div" class="lg:hidden" @close="mobileMenuOpen = false" :open="mobileMenuOpen">
<!-- ... -->
</Dialog>
</ClientOnly> That said, we are going to have a look and see if there is anything we can do in Headless UI to prevent this SSR warning from happening. I'll report back once I know more 👍 |
Hey! Just an update here. We made some changes to Headless UI today that should fix this issue without the need for using the While we haven't done a new release yet, you can install this version already using our insiders channel:
Again, that should fix things for you, but let us know if not! |
Sweet! Thanks, will test this out today and see how it goes!!! |
Using @headlessui/vue@insiders fixed the issue for me. Thanks, @reinink! Thanks @bllchmbrs for bringing this up too. I was stuck on this for quite a while. |
What component (if applicable)
Specific Component
Describe the bug
To Reproduce
Steps to reproduce the behavior:
I receive the following warning when opening a page with this navigation component.
On initial page loadWhen clicked it throws the following error:
Interestingly, if I comment out this code:
The main menu works fine (but obviously the mobile menu doesn't).
Expected behavior
I would expect it to not throw any errors.
Screenshots
If applicable, add screenshots to help explain your problem.
Browser/Device (if applicable)
Additional context
On second thought: On second thought, this might be a problem with the dialog in headlessui. Since if I comment out that code, it works fine.
On third thought: This is a global problem with all header components in tailwindui. I cannot use any of the headers provided by tailwindui because of this. Can you all please prioritize fixing this? it's a pretty critical issue (either here or in headless ui) because it renders these components incomplete. If it is a headless ui bug, please tell me where to post it.
The text was updated successfully, but these errors were encountered: