πŸ“Š React Js
Q. Which React method is used to update the UI when state changes in class components?
  • (A) render()
  • (B) setState()
  • (C) updateUI()
  • (D) changeState()
πŸ’¬ Discuss
βœ… Correct Answer: (B) setState()

Explanation: setState() updates the state and triggers a re-render in class components.

Explanation by: Mr. Dubey
setState() updates the state and triggers a re-render in class components.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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