Subscribe on changes!

Empty v-html in dynamic component

avatar
Feb 13th 2023

Vue version

3.2.47

Link to minimal reproduction

https://stackblitz.com/edit/github-bd1lay?file=src/pages/Home.vue

Steps to reproduce

  • Create an dynamic Component with an tag and a v-html content as props of the component
  • Try to fill the component

What is expected?

v-html in filled on site load

What is actually happening?

v-html is on first site load empty (not undefined) and will be hydrated and filled only after a change. This behaviour is also contained in a static export (via Nuxt) and not only in dev mode.

System Info

System:
    OS: macOS 12.3.1
    CPU: (8) arm64 Apple M1
    Memory: 247.64 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Firefox: 109.0.1
    Safari: 15.4

Any additional comments?

Interesting: As soon as I replace the tag prop with a fixed string, everything works as it should. Can it be related to Vue SSR?

In the normal SFC Playground ists working: https://sfc.vuejs.org/#eNp9ksFugzAMhl/FyqWbVODO0k57gx16zIWBKanAiRKXTqp49znAJrpJQwglv60P+7fv6s37fLyiKpWOdbCeISJf/dGQYTt4FxjuELCFCdrgBthJ8s4QwBo8YWSRlqBRebEKCWrUiyFdLNxEJM04+L5ilBtAtjzpqL85XJ0PRjV2NAoYP1ku2h9PnY0gryPoXdUAOamzczehS6kKikeeLn7+o/ZqqTQbKp9foiNp9Z6yzRqIRpUwK0mbyy7l0DH7WBZFbOvUyyXmLpyL1Fm4kliDOcYh+wjuFjEI2Kj9hlGIOGLIAlKDAcN/zF+pf7gJOxmapJWNuWliD27q2kk/hMRQ2ii+iZVizZh1PPTpKm6uVm38maeynTz0FaURJF8kaokxtFWN8B6cj4tRQn4tIXKwdJYRiyDsrSLlGqodxbQ9kg0H2MlMd/s5U3bpAA22lnCG6vl7fHp+XBc1fQHhGuYu

avatar
Feb 13th 2023

I see thats could be a duplicate of 6435 @edison1105 A ETA for this would be nice. Annoying bug :/