Accessing grandchildren
I'm using Astro, and I have an Astro component that passes children to a Solid component. I'd like to iterate over these children, but, unfortunately, Astro wraps them all in a
<astro-slot>
element. Is there a way to access the children of this element through props.children
?5 Replies
Hmm I think that's not possible. What do you want to accomplish? Maybe there is another way.
I'm using the Solid JS Swiper component to render a slideshow. What I'd like to do is use Astro's
<Image>
component to handle optimization of the images, and then pass those components as children to be placed within individual slides in Swiper. However, the behavior I'm getting is that all children images are rendered into a single slide, rather defeating the purpose.Do keyed slots not work?
*named slots
That might work if I know how many slots are needed ahead of time.