|
|
|
@ -188,9 +188,9 @@ If a *key* expression is provided — which must uniquely identify each list ite
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
You can freely use the destructuring pattern in each blocks, the rest syntax being supported.
|
|
|
|
|
You can freely use destructuring and rest patterns in each blocks.
|
|
|
|
|
|
|
|
|
|
```sv
|
|
|
|
|
```html
|
|
|
|
|
{#each items as { id, name, qty }, i (id)}
|
|
|
|
|
<li>{i + 1}: {name} x {qty}</li>
|
|
|
|
|
{/each}
|
|
|
|
@ -198,6 +198,7 @@ You can freely use the destructuring pattern in each blocks, the rest syntax bei
|
|
|
|
|
{#each objects as { id, ...rest }}
|
|
|
|
|
<li><span>{id}</span><MyComponent {...rest}/></li>
|
|
|
|
|
{/each}
|
|
|
|
|
|
|
|
|
|
{#each items as [id, ...rest]}
|
|
|
|
|
<li><span>{id}</span><MyComponent values={rest}/></li>
|
|
|
|
|
{/each}
|
|
|
|
|