← Quiz: React Basics: all 10 questions
Quiz: React Basics · Question 5 of 10
Why should list keys be stable ids rather than array indexes?
Why should list keys be stable ids rather than array indexes?
- A.Indexes are not allowed
- B.Indexes change when items are added, removed or reordered, confusing React
- C.Ids make the app faster to download
- D.Keys are optional anyway
Answer & explanation
Correct answer: Indexes change when items are added, removed or reordered, confusing React
Stable keys let React match items correctly between renders.
Can you get the rest right without peeking?
Take the timed Quiz: React Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →