Flux は、単方向(一方向)のデータフローを使ってステートを管理するためのアーキテクチャパターン(Facebook発祥)です。これはReduxの概念的基礎となり、ほとんどの現代的なstate管理ライブラリに影響を与えました。核となるアイデアは、データが単一で予測可能な方向に流れることです。
なぜ重要なのか
text
Action → Dispatcher → Store → View
↑ │
└───────────────────────────────────┘
(user interaction creates a new Action)
text
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
