Skip to content
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

Hydration mismatch caused by computed not updating during SSR #10069

Closed
paro-paro opened this issue Jan 10, 2024 · 10 comments
Closed

Hydration mismatch caused by computed not updating during SSR #10069

paro-paro opened this issue Jan 10, 2024 · 10 comments
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: ssr

Comments

@paro-paro
Copy link

paro-paro commented Jan 10, 2024

Vue version

3.4.8

Link to minimal reproduction

https://stackblitz.com/edit/nuxt-starter-fnlumb?file=app.vue

Steps to reproduce

Sorry for adding a new hydration issue... But latest vue v3.4.8 does not seem to have fixed all hydration issues that appeared after the 3.4 upgrade.

The repro shows a hydration style mismatch using a simple application layout from vuetify.

Related vuetify issue here

Maintainer from vuetify is pointing to vuejs/core#5300 which is closed...

Thanks in advanced

What is expected?

No hydration warnings.

What is actually happening?

Hydration warnings are thrown.

System Info

No response

Any additional comments?

No response

@jianggangsheng
Copy link

jianggangsheng commented Jan 11, 2024

image 我也遇到了哎,VUE3.4.8 nuxt3.9.1 ELEMENT PLUS2.4.4

@yyx990803
Copy link
Member

@jianggangsheng this is a separate issue fixed in dcc68ef

@yyx990803
Copy link
Member

For this specific warning in Vuetify, it is indeed related to #5300 because Vuetify uses computed to manage nested z-index for layouts, so this is no longer an issue with the hydration mismatch detection logic itself, but rather the detection is revealing real issues in other areas.

@yyx990803 yyx990803 added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: ssr labels Jan 11, 2024
@yyx990803 yyx990803 changed the title Hydration style mismatch warnings are still thrown in latest v3.4.8 version Hydration mismatch caused by computed not updating during SSR Jan 11, 2024
@paro-paro
Copy link
Author

Thanks for the clarification!

@jianggangsheng
Copy link

@jianggangsheng这是dcc68ef中修复的一个单独问题

但好像没有完全解决这个问题,el-form组件写出来的错误是没有了,不过el-dialog和el-alert的警告还在
image

@yyx990803
Copy link
Member

These are z-index issues probably with the same cause (#5300 computed z-index not updated during SSR)

@paro-paro
Copy link
Author

paro-paro commented Jan 19, 2024

Hi @yyx990803

Sorry to bother... but I just realized that this issue has being marked as low priority ("edge case that only affects a very specific use case") and I don't think that is the case since is heavily affecting nuxt + vuetify users (seems like element users as well).

You cannot make a simple "getting started" vuetify layout without bumping into this issue so I guess is affecting many applications at the moment.

So, are there any plans on addressing this issue short term? The related #5300 is marked as closed and limited to collaborators so any update will be really appreciated.

Thanks in advanced!

@rczdgbg
Copy link

rczdgbg commented Jan 26, 2024

no fix
image

@mkierdev
Copy link

mkierdev commented Feb 8, 2024

@yyx990803 any updates on this? Style mismatch is triggered anytime client-side logic adds/removes classes to the element (for example hide something if user is logged in - due to various reasons check has to be made client-side)

yyx990803 added a commit that referenced this issue Feb 25, 2024
…list tracking (#10397)

Bug fixes
close #10236
close #10069

PRs made stale by this one
close #10290
close #10354
close #10189
close #9480
@yyx990803
Copy link
Member

Closing as this is fixed by the reactivity refactor in 3.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: ssr
Projects
None yet
Development

No branches or pull requests

5 participants