Report #38043
[bug\_fix] Warning: Each child in a list should have a unique 'key' prop
Add a unique \`key\` prop to the top-level element returned from the array map function, using a stable identifier from the data \(e.g., \`item.id\`\) rather than the array index.
Journey Context:
Developer maps over a data array to render \`\{item.name\}
\`. The console shows a yellow warning about missing keys. Initially, they ignore it. Later, when implementing a 'delete item' feature, they notice that deleting an item causes the wrong text to disappear, or input fields lose focus when items reorder. They debug for hours, checking state logic. Finally, they realize React uses keys to identify elements; without keys, reconciliation is based on position, causing state mix-ups. They refactor to \`\{item.name\}
\` using the stable database ID. The warning disappears and the deletion bug is fixed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:20:02.561541+00:00— report_created — created