0

I have search a lot on internet but I was unable to find solution. Let's say I have API. I send Login request to that API and get back a token with expiraci date and everything. I then want to store that token inside device and be able to 'call it' on every compnent... Thats not a poblem with AsyncStorage. My problem is that I need compability for: web, android, ios.

Is there some library that can do it?

Is it Possible to use AsyncStorage for: web, android and ios?

Thanks for every solution!

Sorry if this is dumb question but I am new to react native and react in general...

PS: My project is expo managed

1 Answer 1

2

I saw from this answer that you can try @callstack/async-storage. In the readme, it states that it's a cross-platform async storage implementation for web and mobile

Edit

I see that React Native Async Storage does support all the platforms including web. Documentation here.

Sign up to request clarification or add additional context in comments.

4 Comments

Hello, I have checked it but I was unable to run it on android/ios device. To my knowledge it is not compatible with newer versions of Android... But thanks
@AndrewBlack my bad. I see that React Native Async Storage does support web since V2. See my edited answer for links
Hmm thats weird, I was unable to run it in web, I will look more into it and let you know ! :D
Ok, thanks, I am able to run it in my browser and my android... From now on I will stick to their documentation, Upvote and accept. Thanks :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.