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

slot content disappears upon hydration when using polymorphic tags #8247

Closed
1 task
mayank99 opened this issue Aug 27, 2023 · 2 comments · Fixed by #10317
Closed
1 task

slot content disappears upon hydration when using polymorphic tags #8247

mayank99 opened this issue Aug 27, 2023 · 2 comments · Fixed by #10317
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@mayank99
Copy link
Contributor

mayank99 commented Aug 27, 2023

Astro info

v2.10.14

What browser are you using?

Chrome, Firefox

Describe the Bug

WHEN using polymorphic components (or even just assigning a tag name to a variable), AND
WHEN this polymorphic Astro component has a slot, AND
WHEN that slot is filled with a framework (Svelte) component which also has a slot, AND
WHEN the framework component has a client hydration directive:

The slot content doesn't appear.

If you refresh the page, you might be able to see the slot appear in prerendering and then disappear upon hydration.

What's the expected result?

Slot content should stay in the DOM after hydration.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-stsn4j?file=src%2Fpages%2Findex.astro,src%2Fcomponents%2FStuff.svelte,src%2Fcomponents%2FPoly.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 27, 2023
@natemoo-re
Copy link
Member

Valid! Thanks for the nice reproduction and clear description.

@natemoo-re natemoo-re added the - P3: minor bug An edge case that only affects very specific usage (priority) label Aug 31, 2023
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Aug 31, 2023
@ematipico
Copy link
Member

@natemoo-re do you have any hints on where the bug might be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants