What is the purpose of the key prop beyond lists?
Virtual DOM and Reconciliation
Audio flashcard · 0:12Nortren·
What is the purpose of the key prop beyond lists?
0:12
Changing the key of a component tells React to treat it as a completely new instance. This resets its state and triggers a fresh mount, which can be useful when you want to reinitialize a component based on some input.