πŸ“Š React Js
Q. What is the default state of a new useState variable?
Code:
const [count, setCount] = useState();
  • (A) 0
  • (B) undefined
  • (C) null
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (B) undefined

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

Explanation by: Mr. Dubey
If no argument is passed to useState, the default state is undefined.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
184
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate