React lists are used to render multiple components from an array.
Keys are special attributes that help React identify which items have changed, been added, or been removed.
Keys help React's reconciliation algorithm work efficiently by providing a stable identity to each element.
Without keys, React might re-render more elements than necessary.
function TodoList({ todos }) { return ( <ul> {todos.map(todo => ( <li key={todo.id}> {todo.text} </li> ))} </ul> ); }