A

Admin • 833K Points
Coach

Q. Which React method is used to update the UI when state changes in class components?

  • (A) render()
  • (B) setState()
  • (C) updateUI()
  • (D) changeState()
  • Correct Answer - Option(B)
  • Views: 17
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.