Closed revskill10 closed 2 years ago
Hi, yeah, it's not a problem to use any storage you want.
At the current moment, you can specify the storage as a parameter. Limitation - this storage should provide the same methods as the browser's localStorage
(setItem, getItem, removeItem).
If AsyncStorage
has another API you can create a wrapper around it (or I can add this wrapper into the library).
It might be a small problem if AsyncStorage
has async
API and its methods return promises, but it is not a big deal to fix it.
I looked at the AsyncStorage
and I think I can add support of it.
I just will need to write it a bit careful to keep synchronous approach for synchronous storages (like localStorage
in Browsers) and asynchronous for asynchronous storages (like AsyncStorage
)
Quite a lot of time passed but I needed to rewrite the library in order to add support of RN, but now (in version 2) it works.
I see if we use
AsyncStorage
then this library could universally support both web and mobile ?