Support the use of $slot
in Livewire components⚡️
#4199
Replies: 3 comments 9 replies
-
@ralphjsmit currently it's not supported and I don't think it would be simple to implement but it would be interesting if we could! So my question for you would be, how would you expect it to work? Imagine a scenario where you have a component that can take slot content, on the initial render, it would happily display the slot (who's contents would be passed down from a parent component or from a standard blade view served from a controller). But what happens on the next render? So our component makes a request to the server, and tries to render itself (unlike before where it was rendered by the parent with slot passed in), but where does it get the slot content from this time? I don't have a good answer to that last question, but would love to know if you have any ideas? Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
<livewire:table.table> A really useful feature, when we abstract frontend into function. |
Beta Was this translation helpful? Give feedback.
-
Are the slots components still in the roadmap ? |
Beta Was this translation helpful? Give feedback.
-
Hey Livewire team,
It would be great if you could do something like this:
Is this supported? If not, would it take much to support it?
Beta Was this translation helpful? Give feedback.
All reactions