It's time to ditch Medium for good! 🌈⚡️

Introducing Devblog by Hashnode. Blog on your domain for FREE. Highly customizable and optimized for developers.

Learn more

Why does React emphasize on unidirectional data flow and Flux architecture?


Two way data binding leads to updates that are unpredictable. Imagine how Angular handles this - through dirty checking! This is super slow and counter productive - not to mention the max 10 apply cycle limit. Although this will be solved via Object.observe in Angular 2.0, in my opinion bi-directional binding is not the best way to handle data flow in most cases.

By keeping the data flow unidirectional you keep a single source of truth i.e. Store. Your views are just the functions of the application state. Change the state and your view changes. This is way more predictable and gives you a clear idea about how different components react to state change.

Reply to this…

(4 answers) Take me to the question