Skip to content

Commit

Permalink
[docs] fix tutorial/keyed-each-blocks (#7218)
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-brainbox committed Apr 11, 2022
1 parent c36f1c0 commit 1e0c10b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Keyed each blocks

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.

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.
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.

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

Expand Down

0 comments on commit 1e0c10b

Please sign in to comment.