- Redux - Discussion
- Redux - Useful Resources
- Redux - Quick Guide
- Redux - React Example
- Redux - Integrate React
- Redux - Testing
- Redux - Devtools
- Redux - Middleware
- Redux - Reducers
- Redux - Pure Functions
- Redux - Actions
- Redux - Store
- Redux - Data Flow
- Redux - Core Concepts
- Redux - Installation
- Redux - Overview
- Redux - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Redux - Data Flow
Redux follows the unidirectional data flow. It means that your apppcation data will follow in one-way binding data flow. As the apppcation grows & becomes complex, it is hard to reproduce issues and add new features if you have no control over the state of your apppcation.
Redux reduces the complexity of the code, by enforcing the restriction on how and when state update can happen. This way, managing updated states is easy. We already know about the restrictions as the three principles of Redux. Following diagram will help you understand Redux data flow better −
An action is dispatched when a user interacts with the apppcation.
The root reducer function is called with the current state and the dispatched action. The root reducer may spanide the task among smaller reducer functions, which ultimately returns a new state.
The store notifies the view by executing their callback functions.
The view can retrieve updated state and re-render again.