Subscribe on changes!

"Hydration node mismatch" in very specific template structure

avatar
Apr 3rd 2022

Version

3.2.31

Reproduction link

github.com

Steps to reproduce

  1. Clone reproduction repository and install dependencies.
  2. Run the dev command and open localhost:3000.
  3. Open the browser console to see the error caused by the src/App.vue file.

What is expected?

No errors :)

What is actually happening?

"Hydration node mismatch" error

The Vue SFC Playground result shows that the component with this particular structure is parsed into a single createStaticVNode, which results in a hydration mismatch. Even minimal change to the template creates multiple createElementVNode and createTextVNode and fixes the issue.