Flux ni muundo wa usanifu (kutoka Facebook) kwa kudhibiti hali na mtiririko wa data yenye mwelekeo mmoja (njia moja). Ilikuwa msingi wa dhana kwa Redux na kuathiri maktaba nyingi za hali ya kisasa. Wazo la msingi: data inaflowa katika mwelekeo mmoja, inayotarajiwa.
Mzunguko wa mwelekeo mmoja
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
