A

Admin • 833K Points
Coach

Q. What is the default behavior of setState in class components?

  • (A) It merges the new state with the existing state
  • (B) It replaces the entire state object
  • (C) It immediately updates the state synchronously
  • (D) It triggers a full page reload
  • Correct Answer - Option(A)
  • Views: 25
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

setState merges the provided object with the current state asynchronously.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.