You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I never found the slot syntax to be very intuitive.
Why would fallback content be the hierarchical child?
It looks like some content is being set but it's a replacement that might be there or not.
This might be more terse, but I am not sure it is actually better.
Describe the problem
Svelte 4 had a simple syntax to define the slot default code :
Svelte 5 doesn't really have an equivalent for that, and this has to be done manually :
Either via an
if/else
:Or via a second
snippet
:Describe the proposed solution
It would be nice to have a
{#render}
block that would mimic the<slot/>
behavior :I think that this change may only impact the compiler, as the result code could simply use
$.snippet()
with a condition :If the idea is accepted, I think I could try to implement it...
Importance
nice to have
The text was updated successfully, but these errors were encountered: