Explain the useState hook with an example.
useState lets you add state to functional components.
✅ Syntax:
const [state, setState] = useState(initialValue);
✅ Example:
import { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return (
<button onClick={() => setCount(count + 1)}>
Count: {count}
</button>
);
}