Skip to content

docs: clarify 'each block value' means the iterated array - #2206

Open
okxint wants to merge 1 commit into
sveltejs:mainfrom
okxint:docs/clarify-keyed-each-blocks-wording
Open

docs: clarify 'each block value' means the iterated array#2206
okxint wants to merge 1 commit into
sveltejs:mainfrom
okxint:docs/clarify-keyed-each-blocks-wording

Conversation

@okxint

@okxint okxint commented Aug 29, 2026

Copy link
Copy Markdown

Closes #2179

Summary

The opening sentence of the keyed each blocks tutorial said:

By default, updating the value of an each block will add or remove DOM nodes at the end of the block if the size changes, and update the remaining DOM.

"The value of an each block" is ambiguous — a reader may reasonably wonder whether "value" means the array being iterated over, a per-item value, or something else. Issue #2179 points out that the phrase caused confusion because it reads as if some reactive derived value is changing, not the iterable array itself.

This PR rephrases the sentence to name the subject explicitly:

By default, when the array that an each block iterates over changes, Svelte adds or removes DOM nodes at the end of the block if the length changes, and updates the remaining DOM nodes in-place.

Test plan

Documentation-only change — no code modified.

The opening sentence said 'updating the value of an each block', which
was ambiguous — readers may not know 'value' refers to the array being
iterated, not a per-item value. Rephrase to say 'when the array that an
each block iterates over changes' to make the subject explicit.

Closes sveltejs#2179
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

@okxint is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wording choice in Svelte tutorial

1 participant