Using this API https://github.com/ionic-team/ionic-storage
when we create a database we call the following method
export const createStore = (name:string) => {
storage = new Storage({
name,
driverOrder: [Drivers.IndexedDB, Drivers.LocalStorage]
});
storage.create();
}
So we create it and then we set it a value
createStore(“providers”)
setDB(“providers”, JSON.stringify(providers))
Once it has already been created and a value has been stored. When the application is run again to read or write to the database. Is it necessary to recreate it? I mean, use the statement createStore
1 post - 1 participant