Flux
DOM
Views
Models
View
Model
View
View
Model
Model
DOM
Views
Dispatcher
Store
One way data flow
Data consistency
It's a pattern
Multiple frameworks
Dispatcher
Stores
Views
Dispatcher
Distributes actions to the stores
Registers stores callbacks
Manages dependencies between stores
Stores
Contain app's state and logic
Domain model-like
Interpret actions and emit change event
Views
Components and controllers
Listen to stores and re-render on change
Trigger actions to the dispatcher
Actions
Are domain constants
Could be generated by an action creator
May come from the server
Redux
Creates one single and global store
Merges store and dispatcher
Answers to actions with reducers
(state, action) => state
Thanks !
Made with Slides.com