Replies: 1 comment 2 replies
-
Hmm, I don't see anything suspicious. You want to dig deeper like reproducing it without In general, the custom atomWithAsyncStorage pattern seems good. (I'd prefer it to might-be-too-general atomWithStorage.) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I've been working on an implementation with expo-secure-store, which is similar to AsyncStorage for react native.
vs.
When I use the createJSONStorage in an async selector:
with or without
async
,s
not only includes the data, but it also includes the promise data:The first approach works, but the second doesn't. Looking under the hood, it seems like createJSONStorage is very similar.
What am I missing? I thought it was maybe something to do with the SecureStore implementation, but even when I do this:
The same result applies.
I feel like I'm very close, but have mixed something up. Reading through
createJSONStorage
doesn't seem to have anything strange happening:Beta Was this translation helpful? Give feedback.
All reactions