Skip to main content
InterviewHubPRO
Section Overview
Q45

Question 45 of 407

General

11%
React Core & Hooks (407 Qs)•General

What is the impact of indexes as keys?

junior LevelMost AskedreactGeneral

Keys should be stable, predictable, and unique so that React can keep track of elements.

In the below code snippet each element's key will be based on ordering, rather than tied to the data that is being represented. This limits the optimization capabilities of React's reconciliation engine.