I'm working on a news app where I retrieve data from my Json API using the Http Client. I want to ensure that my data remains stored even if there is no internet connection or if the user closes/restarts the app.
Currently, I retrieve my data in an observable and loop through it asynchronously in my template. If there is no internet connection, I store the data in the native storage of Ionic by looping through my observable.
However, I believe there may be a simpler and more optimized solution, possibly involving the use of async/await, similar to AsyncStorage in React Native.
What recommendations do you have for me? Do you happen to have any sample code to share?
Thank you in advance