1.

Explain Various Flux Elements Including Action, Dispatcher, Store And View?

Answer»

Flux can be better explained by defining its individual components:

  • Actions – They are helper methods that facilitate passing data to the Dispatcher.
  • Dispatcher – It is Central hub of app, it receives actions and BROADCASTS payloads to registered callbacks.
  • Stores – It is said to be Containers for application state & logic that have callbacks registered to the dispatcher. Every store maintains particular state and it will update when it is needed. It wakes up on a relevant DISPATCH to retrieve the requested data. It is ACCOMPLISHED by registering with the dispatcher when constructed. They are similar to model in a traditional MVC (Model View Controller), but they manage the state of many objects — it does not represent a single record of data like ORM models do.
  • Controller Views – React Components GRABS the state from Stores and pass it down through props to child components to view to render application.

Flux can be better explained by defining its individual components:



Discussion

No Comment Found