πŸ“Š React Js
Q. What is returned by the useState hook?
  • (A) Only the current state value
  • (B) A function to update the state
  • (C) An array with current state and setter function
  • (D) A single object
πŸ’¬ Discuss
βœ… Correct Answer: (C) An array with current state and setter function

Explanation: useState returns a pair: current state and a function to update it.

Explanation by: Mr. Dubey
useState returns a pair: current state and a function to update it.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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