-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 errors style attribute since vue 3.4 #10336
Comments
upd. isMounted inside a component solves the problem, but should we add a check everywhere? It's almost as if :style itself is defective
upd2. Is there some kind of lifecycle hook that would indicate the end of hydration of the entire application? |
We don't know what |
I made minimal reproduction: https://github.com/DaniilIsupov/reproduction-hydration |
Yes, this is the crux of the problem useElementSize is a VueUse helper, but that's not important The fact is that in large difficulty applications, some components are mounted before others, which leads to hydration errors when changing some parameters depending on the client side. In my case, VueUse useElementSize passes the width from the client and causes the style attribute of the not yet mounted component to change and throws an error However, this is very difficult to reproduce in a minimal example, since the components are mounted almost simultaneously Therefore, when accessing a client entity in one place, we cannot be sure that all components in which changes will occur have already been mounted and hydration has been completed |
@nestle49 @DaniilIsupov onMounted(() => {
console.log('App.vue')
count.value += 1
}) use |
Vue version
3.4.19
Link to minimal reproduction
#10335
Steps to reproduce
I tried using the onMounted hook but it doesn't seem to guarantee that the hydration process is complete, it seems like a bug. Is this really something that deserves warning?
this is more of a theoretical question, so I don't think reproduction is necessary, you can reproduce it in any minimal SSR
It seems that any style dependency on another style that changes on the client will give an error. We don't understand the concept?
What is expected?
No hydration errors
What is actually happening?
Hydration errors
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: