Flux is a design pattern developed at Facebook that was designed to keep data flowing in one direction.
What does React or Flux have to do with functional JavaScript ?
- Flux provides a way to provide the data that React will use to create the UI
- In Flux, application state data is managed outside of React components in stores. Stores hold and change the data, and are the only thing that can update a view in Flux
What is dispatcher in React ?
An action provides the instructions and data required to make a change. Actions are dispatched using a central control component called the dispatcher
About Flux Implementations
There are different approaches to the implementation of Flux. A few libraries have been open-sourced based upon specific implementations of this design pattern. Here are a few approaches to Flux worth mentioning
- Flux:Facebookâs Flux is the design pattern that we just covered. The Flux library includes an implementation of a dispatcher.
- Reflux:A simplified approach to unidirectional data flow that focuses on actions, stores, and views
- Flummox:A Flux implementation that allows you to build Flux modules through extending JavaScript classes
- Fluxible:A Flux framework created by Yahoo for working with isomorphic
- Redux:A Flux-like library that achieves modularity through functions instead of objects.
- MobX:A state management library that uses observables to respond to changes in state.