Flux should not be confused as a framework based on ReactJS. Flux is an architecture and is designed in order to reduce the complexity of a huge application built with Model View Controller (MVC) architecture and has been designed as an alternative of MVC.
The following are the different Flux components:
View—This is like for any web app, the views (basically the react component) receives the event and passes it to the Actions
Action—They are helper methods (
actionCreators
) that pass the data (payload) andactionType
, received from an external API/view to a dispatcherDispatcher—These are Central hub of all registered callbacks. It receives the actions and acts as a "traffic controller" before it passes it to the Stores
Store—It is a data layer that stores all the computations and business logic. It is also responsible for storing the application state and the single source of truth for the application state. It receives the action from the dispatchers based on the registered...