Q. What does the key prop do in React lists?

  • (A) It sets the list style
  • (B) It uniquely identifies elements for efficient updates
  • (C) It adds a password to components
  • (D) It defines accessibility
πŸ’¬ Discuss
βœ… Correct Answer: (B) It uniquely identifies elements for efficient updates
Explanation: Keys help React identify which items have changed, been added, or removed.
Explanation by: Mr. Dubey
Keys help React identify which items have changed, been added, or removed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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