Skip to content

(tsx) Vue SSR hydration error (defineComponent) #11771

@ElYaiko

Description

@ElYaiko

Vue version

3.4.38

Link to minimal reproduction

https://stackblitz.com/edit/github-wvhf41?file=app.tsx

Steps to reproduce

  • Create a TSX component
  • Return a text concated with a ref (App 2: {a.value}<br/>)

What is expected?

To render the line

What is actually happening?

runtime-core.esm-bundler.js?v=17134382:50 [Vue warn]: Hydration text mismatch in <div id=​"app">​…​</div>​ 
  - rendered on server: "App 2: 0"
  - expected on client: "App 2: " 
  at <Anonymous key=4 > 
  at <NuxtRoot>

System Info

No response

Any additional comments?

You can see the text App 1 is rendered with the ref but App 2 not.
Related:
vuejs/babel-plugin-jsx#568
#7285

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't workinghas workaroundA workaround has been found to avoid the problemscope: ssr

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions