React 19 · State and effects
Add state
Keep a value that re-renders the component when it changes.
const [count, setCount] = useState(0);
Official React 19 documentation
React 19 · State and effects
Keep a value that re-renders the component when it changes.
const [count, setCount] = useState(0);
Official React 19 documentation
Was this page helpful?