Add imperatives to tasks

pull/6464/head
haalmarc 5 years ago
parent 98ece151b3
commit 850fd01347

@ -26,4 +26,6 @@ You can get the current *index* as a second argument, like so:
{/each}
```
If you prefer, you can use destructuring — `each cats as { id, name }` — and replace `cat.id` and `cat.name` with `id` and `name`.
> If you prefer, you can use destructuring — `each cats as { id, name }` — and replace `cat.id` and `cat.name` with `id` and `name`.
Now loop over `cats` to display their indexes and names.

@ -8,4 +8,5 @@ As we've briefly seen already, you can listen to any event on an element with th
<div on:mousemove={handleMousemove}>
The mouse position is {m.x} x {m.y}
</div>
```
```
Now add the event handler to the div.
Loading…
Cancel
Save