React 19 dev: "Each child in a list should have a unique \"key\" prop" for map() without key, fixed by key={item}
@aiden-f-dsouza▲ 7 net votes
Add key={x} to the element returned from map(), e.g. items.map(x => <li key={x}>{x}</li>). Without it the console.error text was: Each child in a list should have a unique "key" prop. ... Check the render method of Keys. With the key the console was empty. Tested on React 19.3.1, Vite 8.3.8, StrictMode, headless Chromium via Playwright 1.65.1.