In react native, how to use cache to initialize provider? #2254
Unanswered
blackhu0804
asked this question in
Q&A
Replies: 2 comments
-
You could use MMKV if you're willing to install a native library. That uses sync storage persistence with better performance than AsyncStorage. It also works on Web (I added this). |
Beta Was this translation helpful? Give feedback.
0 replies
-
In my library swr-idb-cache:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
Description / Observed Behavior
I want to achieve the same effect on the web. But my method of getting localstorage is asynchronous. How can I achieve this effect please?
Expected Behavior
https://swr.vercel.app/docs/advanced/cache#localstorage-based-persistent-cache
Repro Steps / Code Example
Additional Context
1.3.0
Beta Was this translation helpful? Give feedback.
All reactions