withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.81k stars 2.49k forks source link

Vue useId cannot generate unique identifiers for islands #11881

Closed MRamonLeon closed 1 month ago

MRamonLeon commented 2 months ago

Astro Info

Astro                    v4.15.1
Node                     v20.5.1
System                   macOS (arm64)
Package Manager          unknown
Output                   hybrid
Adapter                  @astrojs/node
Integrations             @astrojs/vue

If this issue only occurs in one browser, which browser is a problem?

All browsers.

Describe the Bug

I would like to have unique ids when using new Vue 3.5 useId method in different Astro islands. Basically apply the same you did at https://github.com/withastro/astro/pull/6976. This issue would be the equivalent of https://github.com/withastro/astro/issues/6849 for Vue 3.5 release.

Current improvable result

Screenshot 2024-08-30 at 10 08 26

What's the expected result?

We have a way to generate unique ids for each island using Vue's useId or the recommended Astro method.

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/MRamonLeon/AstroAndVue35UseId?file=README.md

Participation

ematipico commented 2 months ago

Looking forward to your PR!

MRamonLeon commented 2 months ago

@ematipico Sorry I checked the Participation check by mistake.

ematipico commented 1 month ago

PRs welcome