vuetify: [Bug Report][3.4.9] Hydration style mismatch VNavigationDrawer and VAppBar together
Environment
Vuetify Version: 3.4.9 Vue Version: 3.4.7 Browsers: Chrome 117.0.0.0 OS: Linux x86_64
Steps to reproduce
1.- Follow instructions exactly from https://vuetifyjs.com/en/getting-started/installation/#using-nuxt-3
2.- Add ssr on plugin createVuetify({ ssr: true })
3.- Add minimal code on app.vue with VNavigationDrawer and VAppBar together
<template>
<v-layout>
<v-navigation-drawer />
<v-app-bar />
<v-main />
</v-layout>
</template>
Expected Behavior
There should be no vue warns
Actual Behavior
There are mismatch vue warns
[Vue warn]: Hydration style mismatch on <header class="v-toolbar v-toolbar–density-default v-theme–light v-locale–is-ltr v-app-bar" style="top: 0px; z-index: 1004; transform: translateY(0%); position: fixed; left: 0px; width: calc((100% - 0px) - 0px);">…flex
rendered on server: style=“[object Map]” expected on client: style=“[object Map]”
Reproduction Link
https://stackblitz.com/edit/nuxt-starter-wtdujy
Other comments
Only occur using VNavigationDrawer and VAppBar together
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 20
- Comments: 28 (4 by maintainers)
If you followed the Nuxt 3 Installation guide, and came here… Don’t forget to add
ssr: trueincreateVuetify().I am also facing on v-tabs sharply now! Then i just use
<client-only> </client-only>and hydration issue solve for v-tabs.For example,
I am also seeing this on v-tabs where the selected tab is missing the selected classes on the server side.
I’m also facing the same.
https://github.com/vuejs/core/issues/5300 doesn’t actually seem to be fixed
Still seeing this in v3.6.6, too.
yeah, all the issues related to this i’m seeing amount to this. the worst offender I think are v-tooltips - in my project, the SSR issue gave them all the same ID, leading to not only loads of warnings but also all of them displaying the same tooltip 😄
For now, wrapping them in a v-no-ssr is a workaround for that last issue, but obviously still throws a hydration mismatch warning.
Sorry to be the bearer of bad news, but could we reopen this issue? It is still reproduceable on the latest version of
vuetify@3.5.11https://stackblitz.com/edit/nuxt-starter-dsdqtb?file=package.json
This might be one of those issues that needs a global search and replace, seeing it in v-img too, v-navigation-drawer, and more components…
v-img
v-nav-d
v-toolbar
Not sure if this helps? PS I’m on 3.4.10 vue/vuetify
Why is this marked as “Closed”? What is the solution for this problem?
I still have exact the same issue with
v-app-barwith the mismatch Z-Index. My setup:Nuxt 3.4.12 / Vuetify 3.6.13 / Vue 3.4.34 and my v-navigation-drawer only works without throwing this warning if I wrap it in ClientOnly.
FYI, vuejs/core#5300 is marked as closed and issue is still present with:
Vue 3.4.19 Nuxt 3.10.2 Vuetify 3.5.4
Still happening in
3.5.13with anyappcomponent likeVAppBar:Same over here with
vuetify@3.5.11: