Skip to content

How to pass all the slots to <svelte:self> like ...$$restProps #12529

Answered by brunnerh
CNSeniorious000 asked this question in Q&A
Discussion options

You must be logged in to vote

That is not possible in Svelte 3/4, same for events.

In Svelte 5, both event handlers and slots (in the form of snippets) will just be functions passed along other props, so all of them will be forwarded automatically if the props are spread.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CNSeniorious000
Comment options

Answer selected by CNSeniorious000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants