natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
1.01k stars 57 forks source link

Sprite provider components prevents Svelte hydration #57

Closed dwightjack closed 1 year ago

dwightjack commented 1 year ago

It seems that placing a Svelte component within the <Sprite.Provider /> component causes hydration to silently fail.

I have created a demo sandbox based on the official Stackblitz template: https://stackblitz.com/edit/github-aknziw?file=src/pages/index.astro.

The first <Counter />, placed inside the provider, gets rendered but is not interaction. The second one is correctly interactive.

Any hint on how to solve this issue?

dwightjack commented 1 year ago

I have updated the demo sandbox to better reproduce the issue: https://stackblitz.com/edit/github-aknziw?file=src/pages/index.astro

dwightjack commented 1 year ago

After some more investigation, it seems to be an issue related to Astro.slots.render(). I have opened an issue in the Astro main repository: https://github.com/withastro/astro/issues/5032

stramel commented 1 year ago

Thanks for looking into this further @dwightjack. I will go ahead and close this ticket since it seems to be related to Astro and not specifically an issue with this package.