useEffect runs side effects — work that reaches outside React's rendering, like data fetching, subscriptions, timers, or manual DOM updates. It runs after the component renders, keeping side effects out of the render body (render must stay pure).
The dependency array controls timing
useEffect(() => {
document.title = `Count: ${count}`;
}, [count]);
