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 when using with JSX #11012

Closed
sxzz opened this issue May 25, 2024 · 2 comments · May be fixed by #7301
Closed

Hydration mismatch when using with JSX #11012

sxzz opened this issue May 25, 2024 · 2 comments · May be fixed by #7301
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: ssr

Comments

@sxzz
Copy link
Member

sxzz commented May 25, 2024

Vue version

3.4.27

Link to minimal reproduction

https://play.vuejs.org/#__SSR__eNp9UsFOAkEM/ZVmLkLcgImeEE3UeMBENEq8OB5wt+DA0tnMdBBD+Hc7OwIbot6m7eub99qu1VVVdZYBVU/1fe5MxeCRQ3WpySwq6xjWUODEEN5YiQmJM3A4gQ1MnF3AkfQeNbC5wzHjy9AWmP0EI1xxndj2aCVNWp1r0pRb8gz3X9eB2RJcHH7WarXh4hLWmgASNreBWIAionXSFhKQJwdHkKANBS2t3mterbJEAfK5pZvS5HOtetuOyNhZjsuAx8cRtcng9UC7UA0o5jz2hKMt5vZdb1HGpq2p300zlOlJwLioSiGRCKBfmGX9kOfObjeVuqnW7zY6VKbYi+OJmXZm3pIsqHagVS6zMSW6h4qNTCT62Hkbl6X9vKtz7AJm23z+gfn8l/zMr2JOq0eHHt1S1rKr8dhNkVP59nkok2gUF7YIpaD/KT6ht2WIGhPsOlAhshu4Wu2gPh1D05G/XTGS35qKQtM2km85mngWf1nfyz3tnNV9shO1+QY07PS3

Steps to reproduce

  • Open reproduction link.
  • An error appears in the output.

What is expected?

No errors.

What is actually happening?

Hydration completed but contains mismatches. error

System Info

No response

Any additional comments?

On the client side, <button>Increase: { count.value }</button> is essentially just one text node. This means it merges the static node "Increase: " and the dynamic node { count.value }.
But on the server side, it will be two separate nodes. This results in one more node on the server side compared to the client.

Workaround:

This issue was originally reported by @icarusgk.

@sxzz sxzz added scope: ssr 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels May 25, 2024
@edison1105
Copy link
Member

duplicate of #7285

@yyx990803
Copy link
Member

Closing as duplicate

@yyx990803 yyx990803 closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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

Successfully merging a pull request may close this issue.

3 participants