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
