Skip to content

Hydration mismatch with useId() if <Icon /> is used #356

@robinscholz

Description

@robinscholz

We’ve consistently ran into issues with hydration and useId across some Nuxt projects and I think we finally found the culprit. I've forked the example from #310 and slightly altered it to reproduce the issue. Both svg and css mode lead to the error. Might it be related to the custom api endpoint?

[Vue warn]: Hydration attribute mismatch on <input id=​"v-1-0">​ 
  - rendered on server: id="v-1-0"
  - expected on client: id="v-0-0"
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch. 
  at <CustomInput> 
  at <TestComponent> 
  at <App key=4 > 
  at <NuxtRoot>

The reproduction can be found here:
https://stackblitz.com/edit/github-pz2kcg-jtmax8ot?file=nuxt.config.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions