-
Book Overview & Buying
-
Table Of Contents
Flux Architecture
By :
Stores help us separate the state found in our architectures into features. This works out well because we can have drastically different data structures from one feature to the next. Alternatively, we could find that, as new features are introduced, a lot of the same data starts to appear in different stores. Nobody wants to repeat themselves—it's inefficient, and we can do better.
In this section, we'll introduce the notion of generic stores. These types of stores aren't necessarily used by views, but by other stores as a sort of repository for common data. We'll then walk through the basic setup of a generic store and how we can put generic stores to use in our more specialized stores.
Generic stores are similar to parent classes in a class hierarchy. A parent class has the common behavior and properties found in several children. However, unlike class hierarchies, we don't have several levels of structure...