Q. What is the role of the `key` prop in lists?

  • (A) To sort elements
  • (B) To style elements
  • (C) To uniquely identify elements
  • (D) To define props
πŸ’¬ Discuss
βœ… Correct Answer: (C) To uniquely identify elements
Explanation: Keys help React identify which items have changed or been removed.
Explanation by: Mr. Dubey
Keys help React identify which items have changed or been removed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
96
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate