A

Admin • 802.91K Points
Coach

Q. Which statement is true about state in React?

  • (A) State can be changed directly
  • (B) State updates are synchronous
  • (C) State should be immutable
  • (D) State is used only in class components
  • Correct Answer - Option(C)
  • Views: 10
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin
State should not be changed directly; it should be updated immutably using setState or state setters.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.