Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydration mismatch in Galleria with Nuxt #7253

Open
2 of 4 tasks
Gonzo17 opened this issue Feb 13, 2025 · 0 comments
Open
2 of 4 tasks

Hydration mismatch in Galleria with Nuxt #7253

Gonzo17 opened this issue Feb 13, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@Gonzo17
Copy link

Gonzo17 commented Feb 13, 2025

Describe the bug

When using PrimeVue in a Nuxt application with the Nuxt module, the Galleria component does have a hydration mismatch.

Image

A quick fix is to add :id="useId()" to the <Galleria> component.

I've had a look into the internals of PrimeVue and it seems like useId from Vue is already used, so I'm not really sure why the quick fix above works.

I've also tried some other components of PrimeVue, they didn't seem to have problems with hydration, but that was just kind of a smoke test since I don't have the time to test all components.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/primevue-galleria-hydration-mismatch?file=app%2Fcomponents%2FMyGalleria.vue

Environment

Vue & Nuxt in the newest version with PrimeVue and it's Nuxt module in the newest version

Vue version

3.5.13

PrimeVue version

4.2.5

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  • Start the nuxt application
  • Open the application in the browser and open the developer tools of your browser
  • The warning for the hydration mismatch appears in the console
  • For each reload the IDs that mismatch increase

Expected behavior

There should not be a hydration mismatch

@Gonzo17 Gonzo17 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 13, 2025
@Gonzo17 Gonzo17 changed the title Issue Title Hydration mismatch in Galleria with Nuxt Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant