Tutorial: Description fix - each block bindings (#5974)

The chapter highlights event binding in `each` block which is missing within the snippet. Thus it seems reasonable to include it within the description snippet block.
pull/7738/head
Kai 5 years ago committed by GitHub
parent 6ae5b6d5d0
commit 795f19ede1

@ -5,6 +5,7 @@ title: Each block bindings
You can even bind to properties inside an `each` block.
```html
{#each todos as todo}
<input
type=checkbox
bind:checked={todo.done}
@ -14,6 +15,7 @@ You can even bind to properties inside an `each` block.
placeholder="What needs to be done?"
bind:value={todo.text}
>
{/each}
```
> Note that interacting with these `<input>` elements will mutate the array. If you prefer to work with immutable data, you should avoid these bindings and use event handlers instead.
Loading…
Cancel
Save