Blog
Writing about web technologies — published directly on this site.
When Does useEffect Really Run?
useEffect does not run during render. Learn why effects fire after paint, why cleanup logs the old value, and how closures make that sequence predictable.
Aug 20, 20266 min readWhy Calling setCount Three Times Doesn't Add Three in React
React batches state updates and uses snapshots inside event handlers. Learn why setCount(count + 1) three times yields 1, and how functional updaters fix it.
Aug 10, 20266 min read