Reputation: 8922
I m actually studying ReactJS and the Flux architecture but I dont really understand what is exactly the "Store" part in this.
What it is exactly ? A database ? A localstorage file ?
Thanks for advance
Upvotes: 0
Views: 203
Reputation: 3536
The store is the part of the application which is responsiple for business logic. An app of any size will have multiple, possibly interdependent, stores. When a store responds to a user action, it may persist data to a database (probably via some restful endpoint), run a calculation or any other business logic. After a store is done, it should emits an event to which views can respond.
the stores themselves contain this business logic. Each store is responsible for a domain of the application, and only update themselves in response to actions.
http://fluxxor.com/what-is-flux.html
Upvotes: 1
Reputation: 1009
With flux you organize your data changes. You call actions from your views which will be dispatched to the stores. Then data manipulation is done in the stores and the change event will be emitted.
For easier and better implementation of a "lean" flux concept look at reflux. It is way easier to grasp.
Upvotes: 1