1
ReactBeginner#hooks#state
Keys give each item a stable identity so React can match elements between renders instead of recreating them, which preserves state and avoids bugs. Array indexes make poor keys for reorderable lists.
{todos.map(t => <Todo key={t.id} data={t} />)}