MarcoB
Avoid hydration mismatch with viewport width
Hello everyone,
I need some advice, I sometimes have to render a different component depending on the size of the viewport.
e.g.
In a case like this, if the viewport is already larger than 1024px, there is no problem, because between server and client the template remains the same. But of course, if I reload the page with a size smaller than 1024px, the hydration mismatch warning appears in the console. Do you have any suggestions for me other than to use the ClientOnly component?
Thank you all!
1 replies
NuxtI18n - Vue router warnings after language change
Hello everyone! Every time I change language with useSwitchLocalePath() of NuxtI18n I get all the route warnings (with the previous locale), does anyone know how to solve this?
reproduction link: https://stackblitz.com/edit/nuxt-starter-1fg4xq?file=server%2Fapi%2Fmenu.get.ts,pages%2Findex.vue
1 replies