The Wayback Machine - https://web.archive.org/web/20250519122446/https://github.com/vuejs/vue/issues/11533
Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Vue SSR v-html on dynamic-component hydration warning #11533

Copy link
Copy link
Open
@privatenumber

Description

@privatenumber
Issue body actions

Version

2.6.11

Reproduction link

The reproduction is updated to use Vue SSR without NUXT
https://github.com/privatenumber/vue-ssr-vhtml-dyncomp-bug

Steps to reproduce

Dynamic.vue

<template>
  <component is="div">
    content necessary
  </component>
</template>

App.vue

<template>
  <dynamic v-html="'<div>trigger hydration warning</div>'" />
</template>

What is expected?

The expected behavior is for there to be no hydration warning when the SSR and client markup are identical.

What is actually happening?

Although there isn't a discrepancy in rendered HTML between client and SSR, it gives warnings that there is.

warningD
warningE

Work around

I used a render function instead of a dynamic-component:

render(h) {
    return h(this.component, this.$slots.default);
}

Other info

Previous issue: #11532

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.