I am trying to make offline mode which saves data from API to native-storage but the issue is I cannot get them in array instead every time I save one it replaces with old one.
So the question is how do I save my data as an array in native-storage?
Code
View
This simply send my post url to server and return all data of that post in order to save them.
yes, your code will definitely replace all data of key item in storage because you store value of res directly.
if you want to push res in current item data then first you have to fetch data from storage then push res into fetched item data variable and set into storage again.
I prefer to use internal storage and not make my app size bigger than it is already, plus except this matter i have nothing more to save for using database.
Unless you can share with me some bright benefits of using database rather than native-storage i think native-storage is enough solution for my need.