-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I add AsyncStorage to a project started with expo #72
Comments
@chidimo Hey, You cannot add additional native modules to expo, unless you eject your project. |
I don't really understand what you mean. I'm a bit new to the world of I came here because the |
I see. Well, let me explain. React Native allows you to extend itself with You said you're using Expo. It's still React Native, already extended with many many |
Okay. I believe I get it now. So the only way I can get access to this This means that once I start with So if I eject i get to manually add vector icons and all other stuff coming from |
@chidimo Yes, you're right. Expo comes with pretty nice and robust collection of native modules. Since RN is extracting it's internal Native Modules to external repos, it's just a matter of time when expo will adjust to this. TBH, I wouldn't care much for the deprecation warning, it's just a hint that next minor RN release would not have Async Storage in-built. thanks. |
@krizzu the problem is, if I start now with a new app and use the depreceated storage, what happens to my app after it is not included any more in the next RN release? What are the easy to use alternatives for someone using expo to store information locally? thank you |
@mathiasseyfert Each major Expo release comes with upgraded RN version. You can see it here. Async Storage on RN is deprecated, because it's been extracted to separate module, which is backward compatible. It's the same module, but lives elsewhere. So I believe Next releases of expo will just move to use external modules, to not break compatibility. thanks. |
I hope this is all clear now, so closing it down. thanks. |
Oh I understand now, thanks for explaining |
I want to use
AsynStorage
for a project which was started withexpo init
.I added the library with
yarn add @react-native-community/async-storage
When I try to import
AsyncStorage
in my project file like below, I get the error shown in the screenshot.When I try to run this command
react-native link @react-native-community/async-storage
as directed in the docs, I get the following error'react-native' is not recognized as an internal or external command, operable program or batch file
How do I resolve this issue. I have tested on both my android phone and on a Genymotion virtual android device.
The text was updated successfully, but these errors were encountered: