Reputation: 13
I am a newbie and learned react-native expo. I am curious why we can't use any native library with Expo.
For example, if I want to use filesystem on expo I just cant use it, I know expo has it's own file system but I want to use another library but that library requires linking so it is not working in expo. Why is that?
I have tried everything.
This is the library that I want to use ==> https://github.com/itinance/react-native-fs
It requires command : react-native link react-native-fs
How do I do it?
Upvotes: 1
Views: 1110
Reputation: 1204
You first have to understand the difference between react-native cli
& expo
Please read this documentation to understand the difference
React Native expo
uses their own servers to compile your javascript into java and return APK file as a complete APP, and that is the reason you do not need android SDKs or android studio environment on your PC when you are using expo
but when you are using react-native cli
you do need the android studio environment such as SDKs, because when you are using cli
, it compiles the code using that android studio sdk/environment that you made in your PC that is why you do not need a third party server like expo do.
and thats the reason you get android files right in your react-native
project and due to which you can add native modules to it.
However you also have the option to use expo-eject
, You can read more about expo-eject in this documentation
Thank You!, Have a great day & welcome to stackoverflow community!.
Upvotes: 1