useRoute() causing hydration mismatches
I am using
https://stackblitz.com/edit/nuxt-starter-umaxer
Note that you have to run
Adding
I am really at a loss here, any input would be really helpful!
app.vue
`
box.vue
useRoute() to conditionally render classes and elements. All works well on dev but when deployed as SSG I get very strange results and "Hydration completed but contains mismatches" in the console. In a child component a prop which value is determined by useRoute().query is used for both v-f and conditional styles and classes. The v-if is working as expected but the class and style bindings are not.https://stackblitz.com/edit/nuxt-starter-umaxer
Note that you have to run
npx nuxt generate and npx nuxt start or deploy as SSG.Adding
?box=second to the url renders the second box with "inactive" styles and classes but the v-if is rendered as active. "Hydration completed but contains mismatches" is logged in the console.I am really at a loss here, any input would be really helpful!
app.vue
`
box.vue
StackBlitzHenrik Hansson
Create a new Nuxt project, module, layer or start from a theme with our collection of starters.