Error codesLists

@for key must identify the item stably

MARKLESS_REPEAT_KEY_UNSTABLEerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_REPEAT_KEY_UNSTABLE: key <keySource> is not built from <itemName> alone. A key may be the item (`key <itemName>`), a path on it (`key <itemName>.id`), a template literal or string + join of such paths (key `${<itemName>.id}:${<itemName>.size}`), or the row's position (`index i; key i`). Row state, event wiring, and DOM reuse follow the key, and the browser computes each row's key without loading page code, so a key that calls a function or reads anything besides the row item cannot match rows of <collectionSource> with themselves.
The key is the stable identity root for a repeated graph scope across reorder, insert, delete, and resume; a value that is not derived from the item or its position cannot identify anything.
Key by a stable field of <itemName>, such as `key <itemName>.id`, join fields into one string when no single field is unique, or key by position with `index i; key i` when state should follow the slot. A key a function computes can be stored on each item as a field.
https://markless.dev/errors/MARKLESS_REPEAT_KEY_UNSTABLE

Words in angle brackets change from case to case.

Why

The key is the stable identity root for a repeated graph scope across reorder, insert, delete, and resume; a value that is not derived from the item or its position cannot identify anything.

Fix

Key by a stable field of <itemName>, such as `key <itemName>.id`, join fields into one string when no single field is unique, or key by position with `index i; key i` when state should follow the slot. A key a function computes can be stored on each item as a field.

Where Markless raises it

All error codes

Button sounds are from Josh Comeau's Button Sounds library.