πŸ“Š React Js
Q. What is the role of the `key` prop in React?
  • (A) To pass data to components
  • (B) To keep elements stable during updates
  • (C) To identify the component
  • (D) To trigger a rerender
πŸ’¬ Discuss
βœ… Correct Answer: (B) To keep elements stable during updates

Explanation: Keys help React identify which items have changed, are added, or are removed.

Explanation by: Mr. Dubey
Keys help React identify which items have changed, are added, or are removed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
53
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
97%
Success Rate