Demystify React’s most misunderstood hook by learning to synchronize side effects like data fetching and timers. We break down dependency array patterns and cleanup functions to help you avoid infinite loops.

The mental model for useEffect should be synchronization, not lifecycle. It is not about when a component was born or died, but about ensuring the external system stays in sync with the current state of the UI.
Explain useEffect as syncing React with outside world like fetching data or timers. Cover dependency array meaning: empty, none, specific values. Mention cleanup briefly.


Cree par des anciens de Columbia University a San Francisco
"Instead of endless scrolling, I just hit play on BeFreed. It saves me so much time."
"I never knew where to start with nonfiction—BeFreed’s book lists turned into podcasts gave me a clear path."
"Perfect balance between learning and entertainment. Finished ‘Thinking, Fast and Slow’ on my commute this week."
"Crazy how much I learned while walking the dog. BeFreed = small habits → big gains."
"Reading used to feel like a chore. Now it’s just part of my lifestyle."
"Feels effortless compared to reading. I’ve finished 6 books this month already."
"BeFreed turned my guilty doomscrolling into something that feels productive and inspiring."
"BeFreed turned my commute into learning time. 20-min podcasts are perfect for finishing books I never had time for."
"BeFreed replaced my podcast queue. Imagine Spotify for books — that’s it. 🙌"
"It is great for me to learn something from the book without reading it."
"The themed book list podcasts help me connect ideas across authors—like a guided audio journey."
"Makes me feel smarter every time before going to work"
Cree par des anciens de Columbia University a San Francisco

Lena: You know, Jackson, I was talking to a developer recently who said their API call was firing three times on mount, and they just told me, "I don't know—it just does that." It's like useEffect is this mysterious black box for so many of us!
Jackson: Right! It’s often blamed for being unpredictable, but it’s really just about synchronization. Think of your React component as a pure, clean room. Anything that touches the "outside world"—like fetching data, starting a timer, or manual DOM changes—is a side effect. useEffect is just your way of saying, "Wait until the paint dries on the UI, then go take out the trash."
Lena: Exactly, it’s that "render then commit" mental model. But if you miss a dependency or forget a cleanup, that's when the infinite loops and memory leaks start.
Jackson: Precisely. So let’s dive into how that dependency array actually controls the "when" of your code.