Mapped list element missing a key
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
An element returned from .map() without a key prop makes React fall back to index-based reconciliation and logs a console warning. Heuristic: matches single-line map callbacks that return JSX with no key on the opening tag; multi-line callbacks are not flagged.
Why it matters
An element returned from .map() without a key makes React fall back to positional matching and log a "each child in a list should have a unique key" warning. Without stable keys, updates to the list can attach state to the wrong row. This is a heuristic that only catches single-line map callbacks; a callback spread across several lines is not flagged.
How to fix it
Add a key prop to the top-level element returned by the map, using a stable unique id from the item. If the callback returns a fragment, use the <React.Fragment key={id}> long form so the key has somewhere to live.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo