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

  • (A) Used as an index
  • (B) Used to uniquely identify list items
  • (C) Used to sort list items
  • (D) Used for applying styles
πŸ’¬ Discuss
βœ… Correct Answer: (B) Used to uniquely identify list items
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

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