I was able to manage our own storage service that provides functionality to support async storage with the help of StorageMap library that use IndexedDb and AsyncStorageEngine.
Et voilà!
You can now use your async StorageService with NGXS!
Note: This will not work with IE11 and target type ES5 because ngxs-lab/data @Persistence decorator use the Package class that is only available with ES6 (ES2015). I was not able get this work event if I tried with the following packages:
I was able to manage our own storage service that provides functionality to support async storage with the help of StorageMap library that use IndexedDb and AsyncStorageEngine.
Install StorageMap .
Install AsyncStorageEngine
Create a new storage service and implement AsyncStorageEngine with missing members like this:
In your app.module.ts, configure your NgxsModule and other packages like this:
In your state class, add the following decorators:
Et voilà! You can now use your async StorageService with NGXS!
Originally posted by @SteveLemire in https://github.com/ngxs-labs/data/issues/299#issuecomment-631042493