woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.02k stars 38 forks source link

Make slots work #9

Closed woutdp closed 1 year ago

woutdp commented 1 year ago

Maybe custom components are the answer here

woutdp commented 1 year ago

Some findings:

For SSR there's support for passing the slot. For the client pasing the $$slots prop seems like the way to go but it's not working. Something like$$slots: {default: ...} seems to at least crash the component if there's a slot

Still not sure if it's even possible

woutdp commented 1 year ago

https://github.com/sveltejs/svelte/issues/2588

woutdp commented 1 year ago

Custom components also look promising, maybe with the use of https://github.com/crisward/svelte-tag

woutdp commented 1 year ago

Slots sort of work, still experimental but it's a start