> For the complete documentation index, see [llms.txt](https://riceball.gitbook.io/frontend-dev-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riceball.gitbook.io/frontend-dev-guide/frontend-deep-dive/frameworks-libraries/react/waterfalls-unidirectional-data-flow.md).

# Waterfalls, Unidirectional 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://riceball.gitbook.io/frontend-dev-guide/frontend-deep-dive/frameworks-libraries/react/waterfalls-unidirectional-data-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
