Skip to content

Commit 13a0f50

Browse files
fix: Improve the readability of 05-keyed-each-blocks in tutorial (sveltejs#1071)
* improve redability * Update apps/svelte.dev/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/index.md --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 30648d0 commit 13a0f50

File tree

1 file changed

+1
-1
lines changed
  • apps/svelte.dev/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks

1 file changed

+1
-1
lines changed

apps/svelte.dev/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Click the 'Remove first thing' button a few times, and notice what happens:
1313

1414
> [!NOTE] If you're coming from React, this might seem strange, because you're used to the entire component re-rendering when state changes. Svelte works differently: the component 'runs' once, and subsequent updates are 'fine-grained'. This makes things faster and gives you more control.
1515
16-
One way to fix it would be to make `emoji` a [`$derived`](derived-state) value. But it makes more sense to remove the first `<Thing>` component altogether than to remove the _last_ one and update all the others.
16+
One way to fix it would be to make `emoji` a [`$derived`](derived-state) value. But it makes more sense to remove the first `<Thing>` component altogether rather than remove the _last_ one and update all the others.
1717

1818
To do that, we specify a unique _key_ for each iteration of the `each` block:
1919

0 commit comments

Comments
 (0)