πŸ“Š React Js
Q. How do you prevent a component from re-rendering in React?
  • (A) By returning null in render
  • (B) By using React.memo
  • (C) By avoiding JSX
  • (D) By not using useState
πŸ’¬ Discuss
βœ… Correct Answer: (B) By using React.memo

Explanation: React.memo is a higher-order component that prevents re-rendering if props do not change.

Explanation by: Mr. Dubey
React.memo is a higher-order component that prevents re-rendering if props do not change.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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