-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Different behavior with slot vs Astro.slots.render #7068
Comments
let me take a look |
@ido-pluto you should add a await for |
I don't see |
I created a new repo for this: It seems like in Astro version 3, the issue changed form: instead of empty slots, all the slot renders are the same |
It does render the same random number each time you call <RenderMulti count={10}>
{() => <RandomCard/>}
</RenderMulti> Does that work for you? |
This is working, but it is not the expected behaviour when I want to rerender a slot. I need this functionality for a framework I built for Astro that uses this for input validation when I want to render the same thing twice and It will have 2 two different outputs. I think it still is performant without cache, because if someone wants to render twice, he expects a different output, if not, why not just store the output yourself in a variable? |
From looking at the compiler output, I would expect that behavior as well. This is probably a bug, I'll take a look. |
What version of
astro
are you using?2.4.4
Are you using an SSR adapter? If so, which one?
node
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Firefox
Describe the Bug
When using the
<slot/>
syntax and rendering the same component twice, the slot content will be empty.Not happening when doing with
Astro.slots.render
Link to Minimal Reproducible Example
https://codesandbox.io/p/sandbox/priceless-solomon-sxv6r4?on=codesandbox&file=%2Fsrc%2Fcomponents%2FCardContainer.astro%3A1%2C1
Participation
The text was updated successfully, but these errors were encountered: