Skip to content

Hydration warning when using Custom Component inside <Teleport> within <ClientOnly> #217

@zabefofoon

Description

@zabefofoon

Environment

Hi there! First of all, thank you for creating such a great module. I've been integrating nuxt/hints into my Nuxt project and found it very useful.

However, I encountered a hydration mismatch warning when placing a custom component inside a , even though the entire block is wrapped in .

Since ensures that the content is rendered only on the client side, I believe this should not cause any hydration issues. It seems like nuxt/hints might be flagging this as a false positive.

Reproduction

https://stackblitz.com/edit/nuxt-starter-naqxso5h?file=layouts%2Fdefault.vue,pages%2Findex.vue

Describe the bug

hints:warn [hydration] Component /home/projects/nuxt-starter-naqxso5h/components/TeleportItem.vue seems to have different html pre and post-hydration. Please make sure you don't have any hydration issue.

Expected Behavior No hydration warning should appear since the component is wrapped in .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions