Better slots and component composition. - #39
Conversation
|
Somewhat like sveltejs/svelte#4556 |
|
I was just going to link that – what are the differences? It looks like this is implemented as described |
|
This is still incomplete and I am brain storming on better syntax. <Component>
<svelte:fragment dense={true}>
This will do something in the component
</svelte:fragment>
</Component> |
|
Wouldn't slots just be a portal for where to render? The contents of what is rendered is determined by the content itself. As far as I understand it, this RFC seems to be mostly about using I have an RFC open about inheriting But, I might be misunderstanding you completely. I'm sorta guessing at the examples |
|
Yeah, sorry for the short explanation. Was thinking more on the lines of something like this: <svelte:slot tag={ListItem} export:dense on:click={func}>
Default
</svelte:slot><svelte:fragment dense={true}>
Content
</svelte:fragment><ListItem dense={true} on:click={func}>
Content
</ListItem> |
|
This was mainly intended to solve sveltejs/svelte#2079 and add some new features. |
|
No problem Yeah, to me that's 100% an inline component, if not an external component. Either of which only get placed by a |
Rendered
This is my first RFC so please comment any helpful suggestions.