Reducing duplicate store data

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 store data

Generic ...

Get Flux Architecture now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.