index-as-key
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when a row's key is built from the .map index and nothing else, which is the identity the diff already had.
The framework reports the same fault while running, as RMD023 — but only once the line actually runs. This is the same fault proved from the source instead.
The index is the identity the diff already had without any key at all, so this one changes
nothing about how rows are matched — it only silences row-without-a-key and reads to the
next person as a decision.
What it costs shows the moment the list is not append-only. Delete the first of ten rows and every row below keeps the key it used to have, so row 2's DOM is matched to row 1's data: a half-typed input, an open menu, a checked box, all one row off, and the page still looks right.
Use whatever makes the row itself different — an id from the data, or a field combination
that is unique among siblings. If the rows have nothing of the kind, list() derives an
identity from the row rather than from its position, which is the whole reason it exists.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.