## Notes The following will not work as expected: ```javascript function MyComponent() { const [counter, setCounter] = useState(0); const handleBadTripleCount = () => { setCounter(counter + 1); setCounter(counter + 1); setCounter(counter + 1); } } ``` State updates are asynchronous and React will batch multiple `setState` calls into a single update. `setState` also provides a callback that fires when the state is updated. Re-rendering is expensive, so it makes sense to batch these state updates. ## References - [[ReactJS Study MOC]]