← React Beginner Questions - Set 12 Q118
What is the importance of keys in a list of elements in React?
React Beginner Questions - Set 12
Example
1
{users.map(u => <li key={u.id}>{u.name}</li>)}
What to notice
- Keys let React move DOM nodes with their state instead of rebuilding them.
← Back to the question list