Update documentation/docs/97-best-practices/10-best-practices.md

Co-authored-by: ComputerGuy <63362464+Ocean-OS@users.noreply.github.com>
best-practices-doc
Rich Harris 2 days ago committed by GitHub
parent b8e557afab
commit 44fd5dc6e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -64,7 +64,7 @@ If you need to attach listeners to `window` or `document` use `<svelte:window on
## Each blocks
When using an each block to iterate over some value prefer using the item without destructuring it in case you want to bind that value to an attribute. Prefer using a keyed each block if possible, this will improve performance because svelte will just compare the keys to know if it needs to update the dom of that specific element.
When using an each block to iterate over some value, prefer using the item without destructuring it in case you want to bind that value to an attribute. Prefer using a [keyed each block](/docs/svelte/each#Keyed-each-blocks) if possible— this will improve performance because Svelte will just compare the keys to know if it needs to update the DOM of that specific element.
```svelte
{#each items as item (item.id)}

Loading…
Cancel
Save