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

fix(ssr): hydrate before onBeforeMount #9140

Closed

Conversation

linghaoSu
Copy link
Contributor

fix #9044

The hook function onBeforeMount is now executed before the hydrate, and some page content may be changed in that hook function, causing the hydrate to fail.

Therefore the hydrate is raised to before the onBeforeMount hook is executed.

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 85.9 kB (+7 B) 32.7 kB (+6 B) 29.5 kB (+2 B)
vue.global.prod.js 132 kB (+7 B) 49.3 kB (+6 B) 44.3 kB (-21 B)

Usages

Name Size Gzip Brotli
createApp 47.9 kB (+7 B) 18.9 kB (+6 B) 17.2 kB (+20 B)
createSSRApp 50.6 kB (+7 B) 20 kB (+6 B) 18.2 kB (-2 B)
defineCustomElement 50.3 kB (+7 B) 19.6 kB (+6 B) 17.9 kB (+8 B)
overall 61.2 kB (+7 B) 23.7 kB (+7 B) 21.5 kB (-29 B)

@linghaoSu
Copy link
Contributor Author

@baiwusanyu-c
Copy link
Member

baiwusanyu-c commented Sep 5, 2023

relate: #7800

@skirtles-code
Copy link
Contributor

I don't think this is a problem that should be fixed. The beforeMount lifecycle hook should run before hydration and should not be used to make changes that will cause hydration failures.

I shared some more thoughts on this at #7800 (comment).

@yyx990803 yyx990803 closed this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

When using dom hydrate, the style performance is inconsistent with the dom performance
4 participants