Q. What is a pure component in React?

  • (A) A component with no JSX
  • (B) A component that never updates
  • (C) A component that renders the same output for the same props
  • (D) A component with only CSS
πŸ’¬ Discuss
βœ… Correct Answer: (C) A component that renders the same output for the same props
Explanation: Pure components prevent unnecessary re-renders by doing a shallow comparison of props and state.
Explanation by: Mr. Dubey
Pure components prevent unnecessary re-renders by doing a shallow comparison of props and state.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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