Introduction to Flux
The Flux architecture creates some restrictions on communication between components. The main principle is that of ubiquitous actions. The application view layer responds to user actions by sending action objects to a Dispatcher. The Dispatcher's role is to send every action to subscribed stores. You can have many stores and each one can act differently in response to the user's action.
For instance, imagine you are building a cart-based application. A user can tap the screen to add some item to the cart, upon which the respective action is dispatched and your cart store reacts to it. Also, an analytics store may track that such an item has been added to the user's cart. Both react to the same action object and use the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access