πŸ™
Frontend Dev Guide
  • ⚑Read Me First
  • πŸ“–Frontend Interview Guide
    • πŸ’¬Technical Behavior
      • Frontend Interview Questions
      • Answering Interview Questions
    • πŸ’»Coding Challenges
      • Frontend Code Challenges
      • Data Structures and Algorithms
        • Binary Search Tree
        • Blind 75 and Neetcode
      • Take Home Assignments
    • πŸ•ΈοΈFrontend System Design
      • What is Frontend System Design?
        • Parts of the Frontend System Design
          • 1) Gather Requirements
          • 2) Architecture/High Level Design
          • 3) Data Model and Flow
          • 4) API
          • 5) Optimization and Deep Dive
        • Example: Design Spotify
  • πŸ”¦Frontend Deep Dive
    • πŸ₯žMicrofrontends
    • 🧩Fundmentals
      • πŸ”΅Cross Browser Compatibility
    • πŸ“šFrameworks/Libraries
      • 🟒Vue
      • πŸ”΅React
        • Waterfalls, Unidirectional Data Flow
        • React Server Components
    • 🏁Patterns
      • 🟑Design Patterns
      • βšͺRendering Patterns
      • 🟣Performance Patterns
    • πŸ”‹Performance
      • βšͺNetwork Optimizations
      • 🟠Build Optimizations
      • 🟣Asset Optimizations
      • πŸ”΅Core Web Vitals
  • 🐍Python
    • βšͺDjango
      • Classbased Views (CBV)
      • Cross-Site Request Forgery (CSRF)
  • πŸ—»Working Life
    • 🟣Technical Communication
  • πŸ“šGlossary
  • πŸ’‘Resources
  • πŸ‘©β€πŸ’»About Me
Powered by GitBook
On this page
  1. Frontend Deep Dive
  2. Frameworks/Libraries
  3. React

Waterfalls, Unidirectional Data Flow

Aka waterfalls, unidirectional data flow, one-way data flow

In React architecture, waterfalls refer to the flow of data and events down through the component hierarchy. This is sometimes also referred to as "unidirectional data flow" or "one-way data flow."

Waterfalls are a key concept in React because they help to enforce a clear and predictable flow of data throughout the application. In a React application, data is typically passed down through a hierarchy of components, with each component responsible for rendering a part of the user interface based on the data it receives.

When an event occurs, such as a user clicking a button or entering text into a form, the event is typically handled by a component at the lowest level of the hierarchy that is responsible for that part of the UI. This component then updates its own state based on the event, and passes any necessary data or state changes up to its parent component. This process continues up the hierarchy until the root component is reached.

By enforcing a one-way flow of data and events, React makes it easier to reason about how data is being used and how changes will propagate through the application. This can help to reduce bugs and make it easier to maintain and update the application over time.

PreviousReactNextReact Server Components

Last updated 2 years ago

πŸ”¦
πŸ“š
πŸ”΅