Closed K4CZP3R closed 4 months ago
Great library!
Only thing I am missing is the API compatibility with AsyncStorage for seamless replace.
For example, Supabase library expects storage object to have the following functions: removeItem, setItem and getItem.
removeItem
setItem
getItem
Workaround for now is to create a wrapper function like this:
const wrappedCacheStore = { getItem: async (key: string) => { return await read(key); }, setItem: async (key: string, value: string) => { await write(key, value); }, removeItem: async (key: string) => { await remove(key); }, };
That sounds good. I'm happy to accept a PR. You'd have to go into the index.tsx and export that type.
index.tsx
Great library!
Only thing I am missing is the API compatibility with AsyncStorage for seamless replace.
For example, Supabase library expects storage object to have the following functions:
removeItem
,setItem
andgetItem
.Workaround for now is to create a wrapper function like this: