Skip to content

"let:" in NavBar #494

Answered by shinokada
deshartman asked this question in Q&A
Dec 19, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@deshartman There are no dumb questions! Only questions you don't ask are dumb questions.
let is the Svelte's let directive.
We use it when a parent component communicates with children components.

Slots can be rendered zero or more times, and can pass values back to the parent using props. The parent exposes the values to the slot template using the let: directive.

The usual shorthand rules apply — let:item is equivalent to let:item={item}, and <slot {item}> is equivalent to .

Replies: 1 comment 1 reply

Comment options

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

Answer selected by deshartman
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