Stop the 'Two Renders' trap by learning why derived data belongs in variables, not state. Using the filtered episodes example, we reveal how to streamline performance and simplify your React architecture.

The Golden Rule is simple: if you can calculate a value from existing state or props, do not store it in state. Your component is basically a mini-database where the state is your raw data and everything else is just a view of that data.
Teach why you should not store calculated values in state. Use filteredEpisodes example. Give rule: if you can calculate it from existing state, don’t store it.


Von Columbia University Alumni in San Francisco entwickelt
"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"
Von Columbia University Alumni in San Francisco entwickelt

Lena: Hey Jackson, I was looking at some code earlier and noticed something that felt like a total red flag. A developer was using a useEffect just to filter a list of episodes and save it into a second state variable.
Jackson: Oh, the classic "Two Renders" problem! It’s easily the most common mistake I see. You dispatch an action, the first state updates, then the effect kicks in and triggers a second render just to sync that derived value. It’s a performance killer and a nightmare for keeping your UI in sync.
Lena: Exactly! It feels like you're constantly chasing your own tail. But there’s a much cleaner way to handle this, right?
Jackson: Definitely. The Golden Rule is simple: if you can calculate a value from existing state or props, do not store it in state. Let’s dive into the filtered episodes example to see how we can refactor this.