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: avoid hydration mismatch warning for styles with different order #10011

Merged
merged 9 commits into from
Jan 8, 2024

Conversation

zh-lx
Copy link
Contributor

@zh-lx zh-lx commented Jan 5, 2024

close #10006, close #10000

  1. avoid hydration mismatch warning for styles with different order
  2. when element with props vShow or v-show, show add display: none when compare match
  3. Some attributes of element can't be gotten by el.hasAttribute(key) such as value of textarea. So we should add checks by el[key] to validate.

Copy link

github-actions bot commented Jan 5, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 89.4 kB 34 kB 30.7 kB
vue.global.prod.js 146 kB 53.3 kB 47.6 kB

Usages

Name Size Gzip Brotli
createApp 49.7 kB 19.5 kB 17.8 kB
createSSRApp 53.1 kB 20.8 kB 19 kB
defineCustomElement 52 kB 20.2 kB 18.5 kB
overall 63.2 kB 24.4 kB 22.2 kB

@yyx990803
Copy link
Member

A note on e2ac3b5 - getSSRProps is only initialized on the directives during server render, and is not available in the client build, so we can't rely on that to handle SSR injected props.

For now, we'll just special-case v-show since that is the only built-in directive that affects style hydration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants