S
SolidJS6mo ago
Nathan

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
Jasmin
Jasmin6mo ago
Hmm I think that's not possible. What do you want to accomplish? Maybe there is another way.
Nathan
Nathan6mo ago
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.
Jasmin
Jasmin6mo ago
Do keyed slots not work? *named slots
Nathan
Nathan6mo ago
That might work if I know how many slots are needed ahead of time.
Want results from more Discord servers?
Add your server
More Posts
Unable to mutate data created by createResource.I have the following code that i'm trying to get to work but it doesnt update the node/ui ``` coServer background jobs / tasksHello! Is it possible to have "long running" jobs in the background on the server? For example to seDragging rectangles impossible? (tried to build a timeline component)Hey, I wanted to build a timeline component where you could drag divs left and right with your mouse[macOS] Module '"@solidjs/router"' has no exported member 'cache'.I wanted to follow the example for caching from https://start.solidjs.com/core-concepts/data-loadingI keep seeing this pattern in some solid code where dom refs are kept in signals.```js function Button(props){ const [button, setButton] = createSignal(); return <button ref={sNeed help in solid-router## my development dependencies:<:ryan:978481377781645352> ```json { "@solidjs/router": "^0.10.5",`Request is not defined` when loading a page with the solid start (basic) dev serverI created a solid-start template with `bun create solid`, settings (basic, no SSR, yes TypeScript), SSG with `bun create solid`?When creating with `bun create solid`, do I have to say yes to SSR if I want SSG? I've picked the tIs there a way to grab a throwed error in "action" functionHello i have a question. I'm going more in depth into solid. But is there actually a way to grab theNPM Start Error + Beginner QuestionI'm new to SolidStart, and I've only been doing web dev with NPM for a few months. Typically, in a