Flux is a data manipulation architecture in React. It offers a substitute for the normal way of transferring data within React applications by passing data into children components.
Flux uses a store to manage the state. Actions in the application trigger acts of data storage. Actions are then passed by the dispatcher into the store, which allows views to display data according to the current state.
There are two fundamental rules of when Flux should be used:
For this issue, the stores offer an alternative solution to accessing data that is different than passing it through components. Hence, the use of Flux maintains the Single Responsibility Principle.
This issue ensures consistency in data manipulation. When more than one actor can change data, it is important that the operations are carried out serially. Flux supposedly ensures this by using serializable action queues.
RELATED TAGS
View all Courses