-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I noticed in the README there is:
<h1>Cats of YouTube</h1>
<ul>
{#each cats as cat}
<li><a target="_blank" href={cat.video}>{cat.name}</a></li>
{/each}
</ul>and
{#each items as item, i}
<p>{i}: {item.name}</p>
{/each}and
{#each items as item (item.id)}
<p>{item.name}</p>
{/each}It would be good to unify the concept of "block params", so that there is only one syntax to mean "these are params passed to the block"
I propose:
{#each items as (item, i, params, here, example)}
<p>{item.name}</p>
{/each}and then for specifying the key, since that's a concern of each and not the block params, it should be closer to what each is iterating over.
{#each items key='id' as (item, i, params, here, , example)}
<p>{item.name}</p>
{/each}(this is in part inspired by the glimmer syntax, where the syntax is immensely narrow, but clear)
babakfp and aantono
Metadata
Metadata
Assignees
Labels
No labels