Flux एक आर्किटेक्चर पैटर्न (Facebook से) है जो एकदिशात्मक (एक-तरफा) डेटा प्रवाह के साथ स्थिति को प्रबंधित करता है। यह Redux के लिए वैचारिक आधार था और इसने अधिकांश आधुनिक स्थिति पुस्तकालयों को प्रभावित किया है। मुख्य विचार: डेटा एक ही, अनुमानित दिशा में बहता है।
एकदिशात्मक चक्र
Action → Dispatcher → Store → View
↑ │
└───────────────────────────────────┘
(user interaction creates a new Action)
1. Action — a plain object describing WHAT happened ({ type: 'ADD_TODO', text })
2. Dispatcher — a central hub that sends every action to the stores
3. Store — holds state + logic; updates itself in response to actions
4. View — renders from the store; user interactions dispatch new actions
