Mastery Points
0
useState Hook in react
Context & Logic
useState is the primary Hook for adding state to functional components. It returns the current state value and a function to update it.
Example
const [count, setCount] = useState(0);
<button onClick={() => setCount(count + 1)}>{count}</button>