Zum Inhalt springen

List Key (ARCH3304)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key typescript.react.list-key · Severity warning · Category quality

React: flags list items rendered by map() with no key, or with the array index as key - React then matches elements by position and re-uses the wrong DOM node.

{items.map((item, index) => <Row key={index} item={item} />)}
{items.map(item => <Row key={item.id} item={item} />)}