πŸ“Š React Js
Q. How can you optimize performance by avoiding unnecessary re-renders in React?
  • (A) Use React.memo for functional components and shouldComponentUpdate for class components
  • (B) Avoid using props
  • (C) Disable JavaScript
  • (D) Use inline styles
πŸ’¬ Discuss
βœ… Correct Answer: (A) Use React.memo for functional components and shouldComponentUpdate for class components

Explanation: These techniques allow React to skip rendering when props/state haven't changed.

Explanation by: Mr. Dubey
These techniques allow React to skip rendering when props/state haven't changed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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