Astro islands not reactive when used within slots that are passed props #8212
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
pkg: integration
Related to any renderer integration (scope)
What version of
astro
are you using?2.10.12
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
As you can see in the repro link, when adding an astro island within a slot that is passed props ( i.e.
<WithSlot>{(foo) => <Demo client:load />}</WithSlot>
), the client scripts responsible for making the island reactive ( in my case, svelte.js ) are not downloaded and the island is not "reactive" ( it keeps whatever is rendered on the server and cannot become reactive on the client ).The issue only occurs when the island within the slot is the only island on the page, if another instance of the same island is added outside the slot, the one within the slot will become reactive as well, because islands outside the slot will trigger the client scripts to be downloaded.
What's the expected result?
I expect astro islands to work normally inside slots, even if I'm not adding more islands outside the slots
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-w2ovbf-6tozmd?file=src%2Fpages%2Findex.astro,src%2Fcomponents%2FDemo.svelte
Participation
The text was updated successfully, but these errors were encountered: