Skip to content

What are keys in React and why are they important? #542

Answered by OrasanuAna
StancuIoana asked this question in Q&A
Discussion options

You must be logged in to vote

Keys are unique identifiers used in lists to help React identify which items have changed, been added, or removed. Without keys, React would recreate all items in the list instead of updating only the affected ones.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by StancuIoana
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants