You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the preview window viewport < 900px width and reload this preview window (top left). The client:load component will mount but does not re-render with a new "mobile" class like the client:only component does. The orange background denotes the mobile class is applied.
What is expected?
I would expect that, as stated in the docs (last paragraph of: https://vuejs.org/guide/scaling-up/ssr.html#hydration-mismatch), when Vue SSR hydration encounters a hydration mismatch it recovers by replacing the server-rendered DOM with the client-rendered DOM.
What is actually happening?
Dynamic attributes and classes on the hydrated component do not update upon hydration and mounting. Other values, like rendered ref values within the template do update.
I understand that other than the docs being confusing, this may not be considered a bug. Hydration mismatch is looked at as an error to be fixed at development time. But I think that idea is wrong in the circumstance that progressive enhancement is an incredibly useful feature to allow a component to partially render, and then fully hydrate to an enhanced state.
I also have a separate reproduction using Nuxt showing the exact same behavior to rule out that Astro is interfering in the first reproduction: https://stackblitz.com/edit/nuxt-starter-patbx4
The text was updated successfully, but these errors were encountered:
Vue version
3.4.21
Link to minimal reproduction
https://stackblitz.com/edit/withastro-astro-7u8olz?file=src%2Fpages%2Findex.astro
Steps to reproduce
Make the preview window viewport < 900px width and reload this preview window (top left). The client:load component will mount but does not re-render with a new "mobile" class like the client:only component does. The orange background denotes the mobile class is applied.
What is expected?
I would expect that, as stated in the docs (last paragraph of: https://vuejs.org/guide/scaling-up/ssr.html#hydration-mismatch), when Vue SSR hydration encounters a hydration mismatch it recovers by replacing the server-rendered DOM with the client-rendered DOM.
What is actually happening?
Dynamic attributes and classes on the hydrated component do not update upon hydration and mounting. Other values, like rendered ref values within the template do update.
System Info
Any additional comments?
I understand that other than the docs being confusing, this may not be considered a bug. Hydration mismatch is looked at as an error to be fixed at development time. But I think that idea is wrong in the circumstance that progressive enhancement is an incredibly useful feature to allow a component to partially render, and then fully hydrate to an enhanced state.
I also have a separate reproduction using Nuxt showing the exact same behavior to rule out that Astro is interfering in the first reproduction: https://stackblitz.com/edit/nuxt-starter-patbx4
The text was updated successfully, but these errors were encountered: