MemotivaVirtual DOM and Reconciliation

Why should you avoid using array index as a key?

Virtual DOM and Reconciliation

Audio flashcard · 0:11

Nortren·

Why should you avoid using array index as a key?

0:11

Using the array index as a key can cause bugs and performance issues when the list is reordered, filtered, or items are inserted. React may reuse the wrong components, leading to incorrect state and DOM updates.