store property
The prop defined by StoresT
.
This object should either be an instance of Store
or should provide access to one or more Store
s.
Instead of storing state within this component via setState
, it is recommended that data be
pulled directly from these stores. This ensures that the data being used is always up to date
and leaves the state management logic to the stores.
If this component only needs data from a single Store
, then StoresT
should be an instance of Store
. This allows the default implementation
of redrawOn
to automatically subscribe to the store.
If this component needs data from multiple Store
instances, then
StoresT
should be a class that provides access to these multiple stores.
Then, you can explicitly select the Store
instances that should be
listened to by overriding _FluxComponentMixin.redrawOn
.
Implementation
StoresT get store => props[_storePropKey] as StoresT;
Implementation
set store(StoresT value) => props[_storePropKey] = value;