What is state in React?
State is data that is local to a component and can change over time.
✅ Example using useState:
import { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return <button onClick={() => setCount(count +
1)}>{count}</button>;
}