Ensure store changes persist by calling save() after set()
This commit is contained in:
@@ -16,6 +16,7 @@ export function useStore() {
|
|||||||
console.log('setValue',key,value);
|
console.log('setValue',key,value);
|
||||||
const store = await getStore();
|
const store = await getStore();
|
||||||
await store.set(key, value);
|
await store.set(key, value);
|
||||||
|
await store.save();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getValue = async <T>(key: string) => {
|
const getValue = async <T>(key: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user