A

Admin • 802.91K Points
Coach

Q. Which method is used to update state in a class component?

  • (A) this.state
  • (B) setState
  • (C) updateState
  • (D) changeState
  • Correct Answer - Option(B)
  • Views: 8
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin
In class components, state is updated using the setState method.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.