ModelRepository<ManagedModel extends Model> constructor
const
ModelRepository<ManagedModel extends Model> ()
A ModelRepository is the top-level means of relaying data between Models and Providers. A conventional implementation would adhere to the singleton pattern.
It should handle the app's caching strategy between Providers. For example, if an app has
an offline-first caching strategy, the ModelRepository first fetches from a SqliteProvider
and then a RestProvider before returning one result. An app should have one Repository for
one data flow (similar to having one Redux store as the source of truth).
implementing this class is not necessary.
Implementation
const ModelRepository();