What is the key used in this example?
const users = [{id: 1, name: 'Alice'}, {id: 2, name: 'Bob'}];
return (
<ul>
{users.map(user => <li key={user.id}>{user.name}</li>)}
</ul>
);
user.name
user
user.id
index
This question is part of this quiz :
Lists and Keys in React