A

Admin • 833.24K Points
Coach

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
  • Correct Answer - Option(B)
  • Views: 24
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

Keys help React identify which items have changed or been removed.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.