InterviewBuddy
All interview questions

Why might an index be a bad list key?

Intermediate

Answer

When list order changes, an index points to a different item and can attach old component state to the wrong row. Prefer a stable ID from the item.