Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code. Flux applications have three major parts: the dispatcher, the stores, and the views (React components). These should not be confused with Model-View-Controller. Controllers do exist in a Flux application, but they are controller-views — views often found at the top of the hierarchy that retrieve data from the stores and pass this data down to their children. Additionally, action creators — dispatcher helper methods — are used to support a semantic API that describes all changes that are possible in the application. It can be useful to think of them as a fourth part of the Flux update cycle.
Features
- Build client-side web applications
- Uses an unidirectional data flow
- Start using Flux immediately without a lot of new code
- Applications have three major parts: the dispatcher, the stores, and the views
- Controllers in a Flux application are controller-views
- Action creators — dispatcher helper methods — are used to support a semantic API