Flux एक आर्किटेक्चर प्याटर्न (Facebook बाट) हो जो unidirectional (एक-तर्फे) डेटा फ्लो सँग स्टेट प्रबन्ध गर्न प्रयोग गरिन्छ। यो Redux को अवधारणात्मक आधार थियो र अधिकांश आधुनिक स्टेट लाइब्रेरीलाई प्रभावित गरेको छ। मूल विचार: डेटा एकै, पूर्वानुमानयोग्य दिशामा बहाव हुन्छ।
The unidirectional cycle
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
