withastro / astro

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

Vue useId cannot generate unique identifiers for islands #11881

Open MRamonLeon opened 2 weeks ago

MRamonLeon commented 2 weeks 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 weeks ago

Looking forward to your PR!

MRamonLeon commented 2 weeks ago

@ematipico Sorry I checked the Participation check by mistake.