This is a helper class that may be used to simplify implementation
of the Store interface. The Store may be implemented as you wish, as
long as it adapts to the interface, but this class can be useful for
managing loading on demand, caching, preloading and more.
You would typically build your store to hold a loader instance per
data type. See the implementation of the MockStore for example usage.
The DataLoader has the following features:
optional caching of data
preload complete data set or on-demand loading of data (single record or batched)
promise sharing of multiple requests for the same data record
This is a helper class that may be used to simplify implementation of the Store interface. The Store may be implemented as you wish, as long as it adapts to the interface, but this class can be useful for managing loading on demand, caching, preloading and more.
You would typically build your store to hold a loader instance per data type. See the implementation of the MockStore for example usage.
The DataLoader has the following features: