useState Return Value
Multiple Choice Easy
Question
What does `useState(0)` return?
Hint
You typically destructure it with const [x, setX] = useState(...).
Explanation
useState returns an array with two elements: the current state value and a function to update it. We typically destructure it as const [count, setCount] = useState(0).
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.