on state change react functional component code example Example: change state in functional component const [count, setCount] = useState(0); setCount(count + 1)