BeFreed
    Categories>Technology>Mastering Minimal State: The Golden Rule of React

    Mastering Minimal State: The Golden Rule of React

    21 min
    |
    |
    8 mar 2026
    TechnologyEducationProductivity

    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.

    Mastering Minimal State: The Golden Rule of React

    Mejor cita de Mastering Minimal State: The Golden Rule of React

    “

    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.

    ”

    Esta lección de audio fue creada por un miembro de la comunidad BeFreed

    Pregunta de entrada

    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.

    Voces del presentador
    Lenaplay
    Jacksonplay
    Estilo de aprendizaje
    Divertido
    Fuentes de conocimiento
    Developing Backbone.js Applications
    Two Scoops of Django
    Clean Code
    Refactoring
    Software Engineering at Google
    Designing Data-Intensive Applications

    Preguntas frecuentes

    The "Two Renders" problem occurs when a developer uses an effect to update a second state variable based on a change in the first. For example, if a user types in a search box, React performs the first render to update the search query state. Only after that render is committed does the useEffect fire to filter the list and call a second state setter, which immediately triggers a second render. This process can cause a visible flash of incorrect data and doubles the workload for the browser's layout engine, leading to a "sticky" or laggy UI.

    The Golden Rule is that if a value can be calculated from existing state or props, you should not store it in a new state variable. Instead of using useState and useEffect to sync derived data, you should calculate the value directly within the component body during the render phase using a simple JavaScript constant. This ensures that the UI always stays in sync with the source of truth and avoids the overhead of unnecessary lifecycle management.

    While most calculations like filtering or mapping a few thousand items are fast enough to happen during every render, useMemo should be used as a performance hint for truly expensive transformations. It allows React to cache the result of a calculation and only re-run it when specific dependencies change. However, the script emphasizes that useMemo is not for storing state; it is a tool to skip unnecessary work. Developers should start with a plain calculation and only add useMemo if the UI feels measurably laggy.

    The "Props-to-State Copy" error happens when a child component initializes internal state from a prop but fails to update when that prop changes. Rather than using a useEffect to manually sync the prop to the state, a cleaner architectural move is to use a key prop on the component. When the value of the key (such as a user ID) changes, React will discard the old component instance and its stale state, creating a fresh version of the component with the new prop values initialized correctly.

    The primary job of useEffect is to synchronize the component with external systems that live outside of React's render cycle. This includes tasks like making network requests to an API, interacting with localStorage, setting up timers, or manual DOM manipulations. If the logic is internal to the app—such as sorting a list, validating a form, or calculating a total—it is a calculation that belongs in the render path, not in an effect.

    Descubre más

    deep react knowledge

    deep react knowledge

    PLAN DE APRENDIZAJE

    deep react knowledge

    React continues to dominate the frontend development landscape, but mastering its core concepts and advanced patterns is essential for building professional-grade applications. This learning plan is ideal for developers who have basic JavaScript knowledge and want to become proficient React engineers capable of building complex, performant applications.

    2 h 22 m•3 Secciones
    Master Go, React, and JavaScript Development

    Master Go, React, and JavaScript Development

    PLAN DE APRENDIZAJE

    Master Go, React, and JavaScript Development

    This plan is essential for developers aiming to bridge the gap between frontend and backend mastery using modern frameworks. It is ideal for aspiring full-stack engineers who want to build scalable, high-performance applications with Go and React.

    4 h 5 m•4 Secciones
    I want to learn how to write react front end

    I want to learn how to write react front end

    PLAN DE APRENDIZAJE

    I want to learn how to write react front end

    React continues to be the most popular JavaScript library for building user interfaces, powering millions of web applications. This learning plan takes you from React fundamentals to advanced architecture patterns, ideal for developers looking to build modern, performant front-end applications.

    3 h 42 m•4 Secciones
    Master CS, DSA & Reduce AI Reliance

    Master CS, DSA & Reduce AI Reliance

    PLAN DE APRENDIZAJE

    Master CS, DSA & Reduce AI Reliance

    In an era of AI-driven development, deep foundational knowledge is what separates elite engineers from the rest. This plan is designed for developers who want to reclaim their technical independence by mastering the underlying principles of systems and algorithms.

    3 h 8 m•4 Secciones
    js read

    js read

    PLAN DE APRENDIZAJE

    js read

    This plan bridges the gap between basic coding and professional web development. It is ideal for aspiring developers looking to master modern JavaScript, from UI interactivity to scalable application architecture.

    2 h 14 m•4 Secciones
    Improve the user experience of the app.

    Improve the user experience of the app.

    PLAN DE APRENDIZAJE

    Improve the user experience of the app.

    This learning plan is essential for product managers and designers looking to bridge the gap between aesthetics and functional business results. It provides a comprehensive roadmap for anyone wanting to master the psychological and data-driven aspects of modern app design.

    2 h 38 m•4 Secciones
    Finish game projects with discipline & focus

    Finish game projects with discipline & focus

    PLAN DE APRENDIZAJE

    Finish game projects with discipline & focus

    This learning plan addresses the critical gap between having creative game ideas and actually bringing them to completion. It's designed for aspiring game designers and developers who struggle with project consistency, frequently abandon projects midway, or find their creative ambitions undermined by poor habits and energy management. By combining game design mastery with productivity systems and sustainable health practices, this plan equips you to not just understand what makes great games, but to develop the discipline and stamina to actually create them.

    2 h 12 m•4 Secciones
    Master Stoicism: Become Like Ayanokoji

    Master Stoicism: Become Like Ayanokoji

    PLAN DE APRENDIZAJE

    Master Stoicism: Become Like Ayanokoji

    This plan is designed for individuals seeking the extreme mental clarity and strategic composure seen in high-performing analytical minds. It bridges ancient Stoic wisdom with modern psychological awareness to build a foundation of absolute self-control and social intelligence.

    3 h 5 m•4 Secciones

    Creado por exalumnos de la Universidad de Columbia en San Francisco

    BeFreed Reúne a una Comunidad Global de 1,000,000 Mentes Curiosas
    Ver más sobre cómo se habla de BeFreed en la web

    "Instead of endless scrolling, I just hit play on BeFreed. It saves me so much time."

    @Moemenn
    platform
    star
    star
    star
    star
    star

    "I never knew where to start with nonfiction—BeFreed’s book lists turned into podcasts gave me a clear path."

    @Chloe, Solo founder, LA
    platform
    comments
    12
    likes
    117

    "Perfect balance between learning and entertainment. Finished ‘Thinking, Fast and Slow’ on my commute this week."

    @Raaaaaachelw
    platform
    star
    star
    star
    star
    star

    "Crazy how much I learned while walking the dog. BeFreed = small habits → big gains."

    @Matt, YC alum
    platform
    comments
    12
    likes
    108

    "Reading used to feel like a chore. Now it’s just part of my lifestyle."

    @Erin, Investment Banking Associate , NYC
    platform
    comments
    254
    likes
    17

    "Feels effortless compared to reading. I’ve finished 6 books this month already."

    @djmikemoore
    platform
    star
    star
    star
    star
    star

    "BeFreed turned my guilty doomscrolling into something that feels productive and inspiring."

    @Pitiful
    platform
    comments
    96
    likes
    4.5K

    "BeFreed turned my commute into learning time. 20-min podcasts are perfect for finishing books I never had time for."

    @SofiaP
    platform
    star
    star
    star
    star
    star

    "BeFreed replaced my podcast queue. Imagine Spotify for books — that’s it. 🙌"

    @Jaded_Falcon
    platform
    comments
    201
    thumbsUp
    16

    "It is great for me to learn something from the book without reading it."

    @OojasSalunke
    platform
    star
    star
    star
    star
    star

    "The themed book list podcasts help me connect ideas across authors—like a guided audio journey."

    @Leo, Law Student, UPenn
    platform
    comments
    37
    likes
    483

    "Makes me feel smarter every time before going to work"

    @Cashflowbubu
    platform
    star
    star
    star
    star
    star

    Creado por exalumnos de la Universidad de Columbia en San Francisco

    BeFreed Reúne a una Comunidad Global de 1,000,000 Mentes Curiosas
    Ver más sobre cómo se habla de BeFreed en la web

    "Instead of endless scrolling, I just hit play on BeFreed. It saves me so much time."

    @Moemenn
    platform
    star
    star
    star
    star
    star

    "I never knew where to start with nonfiction—BeFreed’s book lists turned into podcasts gave me a clear path."

    @Chloe, Solo founder, LA
    platform
    comments
    12
    likes
    117

    "Perfect balance between learning and entertainment. Finished ‘Thinking, Fast and Slow’ on my commute this week."

    @Raaaaaachelw
    platform
    star
    star
    star
    star
    star

    "Crazy how much I learned while walking the dog. BeFreed = small habits → big gains."

    @Matt, YC alum
    platform
    comments
    12
    likes
    108

    "Reading used to feel like a chore. Now it’s just part of my lifestyle."

    @Erin, Investment Banking Associate , NYC
    platform
    comments
    254
    likes
    17

    "Feels effortless compared to reading. I’ve finished 6 books this month already."

    @djmikemoore
    platform
    star
    star
    star
    star
    star

    "BeFreed turned my guilty doomscrolling into something that feels productive and inspiring."

    @Pitiful
    platform
    comments
    96
    likes
    4.5K

    "BeFreed turned my commute into learning time. 20-min podcasts are perfect for finishing books I never had time for."

    @SofiaP
    platform
    star
    star
    star
    star
    star

    "BeFreed replaced my podcast queue. Imagine Spotify for books — that’s it. 🙌"

    @Jaded_Falcon
    platform
    comments
    201
    thumbsUp
    16

    "It is great for me to learn something from the book without reading it."

    @OojasSalunke
    platform
    star
    star
    star
    star
    star

    "The themed book list podcasts help me connect ideas across authors—like a guided audio journey."

    @Leo, Law Student, UPenn
    platform
    comments
    37
    likes
    483

    "Makes me feel smarter every time before going to work"

    @Cashflowbubu
    platform
    star
    star
    star
    star
    star

    "Instead of endless scrolling, I just hit play on BeFreed. It saves me so much time."

    @Moemenn
    platform
    star
    star
    star
    star
    star

    "I never knew where to start with nonfiction—BeFreed’s book lists turned into podcasts gave me a clear path."

    @Chloe, Solo founder, LA
    platform
    comments
    12
    likes
    117

    "Perfect balance between learning and entertainment. Finished ‘Thinking, Fast and Slow’ on my commute this week."

    @Raaaaaachelw
    platform
    star
    star
    star
    star
    star

    "Crazy how much I learned while walking the dog. BeFreed = small habits → big gains."

    @Matt, YC alum
    platform
    comments
    12
    likes
    108

    "Reading used to feel like a chore. Now it’s just part of my lifestyle."

    @Erin, Investment Banking Associate , NYC
    platform
    comments
    254
    likes
    17

    "Feels effortless compared to reading. I’ve finished 6 books this month already."

    @djmikemoore
    platform
    star
    star
    star
    star
    star

    "BeFreed turned my guilty doomscrolling into something that feels productive and inspiring."

    @Pitiful
    platform
    comments
    96
    likes
    4.5K

    "BeFreed turned my commute into learning time. 20-min podcasts are perfect for finishing books I never had time for."

    @SofiaP
    platform
    star
    star
    star
    star
    star

    "BeFreed replaced my podcast queue. Imagine Spotify for books — that’s it. 🙌"

    @Jaded_Falcon
    platform
    comments
    201
    thumbsUp
    16

    "It is great for me to learn something from the book without reading it."

    @OojasSalunke
    platform
    star
    star
    star
    star
    star

    "The themed book list podcasts help me connect ideas across authors—like a guided audio journey."

    @Leo, Law Student, UPenn
    platform
    comments
    37
    likes
    483

    "Makes me feel smarter every time before going to work"

    @Cashflowbubu
    platform
    star
    star
    star
    star
    star

    "Instead of endless scrolling, I just hit play on BeFreed. It saves me so much time."

    @Moemenn
    platform
    star
    star
    star
    star
    star

    "I never knew where to start with nonfiction—BeFreed’s book lists turned into podcasts gave me a clear path."

    @Chloe, Solo founder, LA
    platform
    comments
    12
    likes
    117

    "Perfect balance between learning and entertainment. Finished ‘Thinking, Fast and Slow’ on my commute this week."

    @Raaaaaachelw
    platform
    star
    star
    star
    star
    star

    "Crazy how much I learned while walking the dog. BeFreed = small habits → big gains."

    @Matt, YC alum
    platform
    comments
    12
    likes
    108

    "Reading used to feel like a chore. Now it’s just part of my lifestyle."

    @Erin, Investment Banking Associate , NYC
    platform
    comments
    254
    likes
    17

    "Feels effortless compared to reading. I’ve finished 6 books this month already."

    @djmikemoore
    platform
    star
    star
    star
    star
    star

    "BeFreed turned my guilty doomscrolling into something that feels productive and inspiring."

    @Pitiful
    platform
    comments
    96
    likes
    4.5K

    "BeFreed turned my commute into learning time. 20-min podcasts are perfect for finishing books I never had time for."

    @SofiaP
    platform
    star
    star
    star
    star
    star

    "BeFreed replaced my podcast queue. Imagine Spotify for books — that’s it. 🙌"

    @Jaded_Falcon
    platform
    comments
    201
    thumbsUp
    16

    "It is great for me to learn something from the book without reading it."

    @OojasSalunke
    platform
    star
    star
    star
    star
    star

    "The themed book list podcasts help me connect ideas across authors—like a guided audio journey."

    @Leo, Law Student, UPenn
    platform
    comments
    37
    likes
    483

    "Makes me feel smarter every time before going to work"

    @Cashflowbubu
    platform
    star
    star
    star
    star
    star
    1.5K Ratings4.7
    Comienza tu viaje de aprendizaje, ahora
    BeFreed App
    BeFreed

    Aprende Cualquier Cosa, Personalizado

    DiscordLinkedIn
    Resúmenes de libros destacados
    Crucial ConversationsThe Perfect MarriageInto the WildNever Split the DifferenceAttachedGood to GreatSay Nothing
    Categorías en tendencia
    Self HelpCommunication SkillRelationshipMindfulnessPhilosophyInspirationProductivity
    Lista de lectura de celebridades
    Elon MuskCharlie KirkBill GatesSteve JobsAndrew HubermanJoe RoganJordan Peterson
    Colección premiada
    Pulitzer PrizeNational Book AwardGoodreads Choice AwardsNobel Prize in LiteratureNew York TimesCaldecott MedalNebula Award
    Temas destacados
    ManagementAmerican HistoryWarTradingStoicismAnxietySex
    Mejores libros por año
    2025 Best Non Fiction Books2024 Best Non Fiction Books2023 Best Non Fiction Books
    Autores destacados
    Chimamanda Ngozi AdichieGeorge OrwellO. J. SimpsonBarbara O'NeillWinston ChurchillCharlie Kirk
    BeFreed vs otras apps
    BeFreed vs. Other Book Summary AppsBeFreed vs. ElevenReaderBeFreed vs. ReadwiseBeFreed vs. Anki
    Herramientas de aprendizaje
    Knowledge VisualizerAI Podcast Generator
    Información
    Sobre Nosotrosarrow
    Preciosarrow
    Preguntas Frecuentesarrow
    Blogarrow
    Carrerasarrow
    Asociacionesarrow
    Programa de Embajadoresarrow
    Directorioarrow
    BeFreed
    Try now
    © 2026 BeFreed
    Términos de UsoPolítica de Privacidad
    BeFreed

    Aprende Cualquier Cosa, Personalizado

    DiscordLinkedIn
    Resúmenes de libros destacados
    Crucial ConversationsThe Perfect MarriageInto the WildNever Split the DifferenceAttachedGood to GreatSay Nothing
    Categorías en tendencia
    Self HelpCommunication SkillRelationshipMindfulnessPhilosophyInspirationProductivity
    Lista de lectura de celebridades
    Elon MuskCharlie KirkBill GatesSteve JobsAndrew HubermanJoe RoganJordan Peterson
    Colección premiada
    Pulitzer PrizeNational Book AwardGoodreads Choice AwardsNobel Prize in LiteratureNew York TimesCaldecott MedalNebula Award
    Temas destacados
    ManagementAmerican HistoryWarTradingStoicismAnxietySex
    Mejores libros por año
    2025 Best Non Fiction Books2024 Best Non Fiction Books2023 Best Non Fiction Books
    Herramientas de aprendizaje
    Knowledge VisualizerAI Podcast Generator
    Autores destacados
    Chimamanda Ngozi AdichieGeorge OrwellO. J. SimpsonBarbara O'NeillWinston ChurchillCharlie Kirk
    BeFreed vs otras apps
    BeFreed vs. Other Book Summary AppsBeFreed vs. ElevenReaderBeFreed vs. ReadwiseBeFreed vs. Anki
    Información
    Sobre Nosotrosarrow
    Preciosarrow
    Preguntas Frecuentesarrow
    Blogarrow
    Carrerasarrow
    Asociacionesarrow
    Programa de Embajadoresarrow
    Directorioarrow
    BeFreed
    Try now
    © 2026 BeFreed
    Términos de UsoPolítica de Privacidad

    Puntos clave

    1

    The State Management Golden Rule

    0:00
    0:13
    0:30
    0:37
    2

    The Two Renders Performance Trap

    0:50
    1:23
    1:32
    2:01
    2:06
    2:31
    2:39
    2:58
    3:04
    3:27
    3:31
    3

    Thinking Like a Database Architect

    3:48
    4:10
    0:30
    4:37
    4:53
    5:19
    5:29
    5:48
    5:55
    6:21
    6:25
    6:48
    2:06
    4

    Spotting Red Flags in Your Code

    7:07
    7:29
    7:48
    7:54
    8:13
    8:23
    8:50
    8:57
    9:17
    2:06
    9:47
    9:56
    5

    The Architecture of Minimal State

    10:12
    10:32
    10:43
    11:00
    8:57
    11:31
    11:42
    12:02
    12:12
    12:31
    2:06
    12:53
    13:07
    6

    When You Actually Need an Effect

    13:15
    13:28
    13:36
    13:54
    14:02
    14:21
    14:29
    14:49
    3:31
    15:14
    15:23
    15:38
    8:57
    7

    A Practical Playbook for Clean State

    15:57
    16:13
    2:06
    16:39
    8:23
    17:10
    17:15
    17:30
    17:38
    17:54
    18:01
    18:12
    18:20
    8

    Final Reflections on the Render Cycle

    18:29
    18:45
    18:59
    19:14
    15:23
    19:35
    19:46
    19:57
    20:06
    20:15
    20:21
    0:37
    20:43
    20:52

    Más como esto

    Portada del libro Mastering React: Lifting State Up for Component Coordination
    Developing Backbone.js ApplicationsKubernetes PatternsBuilding MicroservicesThe Book You Wish Your Parents Had Read (and Your Children Will Be Glad That You Did)
    23 sources
    Mastering React: Lifting State Up for Component Coordination
    Learn how to sync isolated components like an EpisodeList and PlayerBar by moving state to a shared parent, ensuring a single source of truth.
    22 min
    Portada del libro React State Mistakes: Stop Storing Derived Data
    Developing Backbone.js ApplicationsTwo Scoops of DjangoRefactoringClean Code
    25 sources
    React State Mistakes: Stop Storing Derived Data
    Managing filtered lists in state often leads to bugs and extra renders. Learn why calculating values on the fly keeps your UI in sync and your code clean.
    22 min
    Portada del libro From Chaos to Control: Mastering React's useReducer
    Developing Backbone.js ApplicationsRefactoring: Improving the Design of Existing CodeKubernetes PatternsHands-On Machine Learning with Scikit-Learn and TensorFlow
    23 sources
    From Chaos to Control: Mastering React's useReducer
    Stop juggling messy useState calls and learn to centralize complex logic. Using an audio player example, we explore how useReducer provides a scalable, predictable blueprint for managing sophisticated state transitions.
    24 min
    Portada del libro Mastering useCallback: Solving the Mystery of Wasted Renders
    Refactoring: Improving the Design of Existing CodeClean CodeHow to Pass ExamsDeveloping Backbone.js Applications
    22 sources
    Mastering useCallback: Solving the Mystery of Wasted Renders
    Learn why stable function identity is the key to React performance. We use the EpisodeCard example to show how useCallback prevents unnecessary re-renders by caching event handlers.
    22 min
    Portada del libro Mastering Controlled Inputs in React
    Developing Backbone.js ApplicationsClean CodeDependency Injection in .NETTwo Scoops of Django
    26 sources
    Mastering Controlled Inputs in React
    Learn to harness the state-to-value loop by transforming a standard search bar into a predictable, state-driven component that gives you total authority over every keystroke.
    22 min
    Portada del libro Mastering React Props: The Blueprint for Dynamic Components
    Developing Backbone.js ApplicationsA Philosophy of Software Design, 2nd EditionClean ArchitectureAlgorithms + Data Structures  eq  Programs
    26 sources
    Mastering React Props: The Blueprint for Dynamic Components
    Discover how to build reusable UI using props to pass data from parents to children. Learn why one-way data flow and immutability are the secrets to predictable React applications.
    22 min
    Portada del libro Simple Rules
    Simple Rules
    Donald Sull & Kathleen M. Eisenhardt
    A guide to crafting streamlined strategies for decision-making in complex environments, using insights from diverse fields and industries.
    10 min
    Portada del libro Refactoring
    Refactoring
    Martin Fowler
    Transform code safely with small, behavior-preserving steps.
    9 min