Report #100093
[bug\_fix] Warning: Each child in a list should have a unique 'key' prop
When rendering an array with .map, add a stable, unique key prop to the top-level element returned for each item. Use the item's database id, slug, or any stable identifier. Do not use array index if the list can reorder, and never use Math.random\(\) or Date.now\(\) because they change on every render and defeat React's reconciliation.
Journey Context:
A todo list renders items with \{todos.map\(todo => \{todo.text\}
\)\} and the console fills with key warnings. Without keys, React cannot tell which items moved, were added, or were removed, so it re-creates DOM nodes unnecessarily and state can jump to the wrong row when the list reorders. Adding key=\{todo.id\} gives React a stable identity for each item. Using the array index silences the warning but still causes subtle bugs on reordering; the index is only acceptable for static lists that never change.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:38:49.356874+00:00— report_created — created