Struggling with infinite loops or double API calls? Learn how to use the dependency array and cleanup functions to keep your UI in sync without the bugs.

Think of the dependency array as a bouncer standing at the edge of that bridge. Its entire job is to look at a list of items you’ve given it and ask one question: 'Has anything on this list changed since the last time I let you through?'
From Columbia University alumni built in 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"
From Columbia University alumni built in San Francisco

Lena: You know, I used to think of my React components like these perfect, isolated snow globes—everything stays inside, pure and predictable. But the second you need to grab data from an API or start a timer, it’s like you’re smashing the glass to reach into the wild frontier of the outside world.
Jackson: That is the perfect image for it! And that’s exactly where useEffect comes in. It’s not just some lifecycle hook; it’s a bridge. But if you don’t build that bridge carefully, you end up with what happened to a developer recently—their API was getting fired three times on every mount because of a misunderstanding with React 18’s StrictMode.
Lena: Ouch, that’s a lot of wasted energy. It’s interesting how this one hook gets blamed for being "magic" or "broken" when it’s really just trying to keep our UI in sync with everything else.
Jackson: Exactly. It’s all about synchronization, not just reacting to events. So, let’s dive into how the dependency array acts as the gatekeeper for that bridge.