Skip to content

Commit c360a6f

Browse files
Update site/content/docs/03-template-syntax.md
Co-authored-by: gtmnayan <[email protected]>
1 parent d1b779f commit c360a6f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

site/content/docs/03-template-syntax.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,8 +1617,12 @@ The usual shorthand rules apply — `let:item` is equivalent to `let:item={item}
16171617
</ul>
16181618
16191619
<!-- App.svelte -->
1620-
<!-- the `let:itemData={thing}` directive makes the value that `FancyList` passes as the `itemData` prop
1621-
available to the slot template as a variable called `thing` -->
1620+
<!-- `itemData` can now be used in the content you pass into the slot using `let:itemData` -->
1621+
<FancyList {items} let:itemData>
1622+
<div>{itemData.text}</div>
1623+
</FancyList>
1624+
1625+
<!-- You can also rename it using the `let:itemData={thing}` syntax. -->
16221626
<FancyList {items} let:itemData={thing}>
16231627
<div>{thing.text}</div>
16241628
</FancyList>

0 commit comments

Comments
 (0)