update tutorial for keyed each blocks

pull/2433/head
Richard Harris 6 years ago
parent c988457afa
commit 6ad3c560a2

@ -14,4 +14,6 @@ To do that, we specify a unique identifier for the `each` block:
{/each}
```
The `(thing.id)` tells Svelte how to figure out what changed.
The `(thing.id)` tells Svelte how to figure out what changed.
> You can use any object as the key, as Svelte uses a `Map` internally — in other words you could do `(thing)` instead of `(thing.id)`. Using a string or number is generally safer, however, since it means identity persists without referential equality, for example when updating with fresh data from an API server.
Loading…
Cancel
Save