Skip to content

Commit d5982cd

Browse files
faetalizegeoffrich
andauthored
Fix each block tutorial wording (sveltejs#402)
* Improved wording. The wording provided initially is confusing, and I believe is mistaken. * Apply suggestions from code review --------- Co-authored-by: Geoff Rich <[email protected]>
1 parent 9ff973b commit d5982cd

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Keyed each blocks
44

55
By default, when you modify the value of an `each` block, it will add and remove items at the _end_ of the block, and update any values that have changed. That might not be what you want.
66

7-
It's easier to show why than to explain. Click the 'Remove first thing' button a few times, and notice what happens: It removes the first `<Thing>` component, but the _last_ DOM node. Then it updates the `name` value in the remaining DOM nodes, but not the emoji, which in `Thing.svelte` is fixed when the component is created.
7+
It's easier to show why than to explain. Click the 'Remove first thing' button a few times, and notice what happens: it does not remove the first `<Thing>` component, but rather the _last_ DOM node. Then it updates the `name` value in the remaining DOM nodes, but not the emoji, which is fixed when each `<Thing>` is created.
88

99
Instead, we'd like to remove only the first `<Thing>` component and its DOM node, and leave the others unaffected.
1010

0 commit comments

Comments
 (0)