Flux ਇੱਕ ਆਰਕੀਟੈਕਚਰ ਪੈਟਰਨ (Facebook ਤੋਂ) ਹੈ ਜੋ unidirectional (ਇੱਕ-ਰਸਤਾ) ਡੇਟਾ ਫਲੋ ਨਾਲ state ਨੂੰ ਮੈਨੇਜ ਕਰਨ ਲਈ ਹੈ। ਇਹ Redux ਦੀ ਸੰਕਲਪਨਾਤਮਕ ਬੁਨਿਆਦ ਸੀ ਅਤੇ ਜ਼ਿਆਦਾਤਰ ਆਧੁਨਿਕ state ਲਾਇਬ੍ਰੇਰੀਆਂ ਨੂੰ ਪ੍ਰਭਾਵਿਤ ਕੀਤਾ ਹੈ। ਮੂਲ ਵਿਚਾਰ: ਡੇਟਾ ਇੱਕ ਸਿੰਗਲ, ਅਨੁਮਾਨਨਯੋਗ ਦਿਸ਼ਾ ਵਿੱਚ ਵਹਿੰਦਾ ਹੈ।
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
