Flux multiple store instances

Posted by Editorial Staff | Updated on

Flux multiple store instances. The Flux way is to create singleton stores. They are not models as we are used to thinking about models in an ORM-style MVC pattern. Stores are instantiated only at the moment of the application’s initialization. They manage a “domain” of logic and data.

These singleton stores register a callback with the dispatcher. The callback is the only way data gets into the stores. Stores also provide getter methods as a public API — the only way data gets out. There are no setters. Stores are a universe of their own, completely in control of their data and behavior.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers