A

Admin • 833.24K Points
Coach

Q. What is the default state of a new useState variable?

Code:
const [count, setCount] = useState();
  • (A) 0
  • (B) undefined
  • (C) null
  • (D) 1
  • Correct Answer - Option(B)
  • Views: 30
  • Filed under category React JS
  • Hashtags:

Explanation by: Admin

If no argument is passed to useState, the default state is undefined.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.