How can I use react-native link or How can I link a third party library manually in IOS and Android using exponent.
I was trying to link react-native-image-crop-picker
but unable to use in exponent.
Expo CLI is a safe bet for a new React Native developer, since it has set of tools built around React Native, so that you only need a recent version of Node. js and a phone or emulator to get started within minutes.
Linking module Published app in Expo Go: exp://u.expo.dev/[project-id]?channel-name=[channel-name]&runtime-version=[runtime-version] Published app in standalone: myapp:// Development in Expo Go: exp://127.0.0.1:19000. You can also change the returned url by passing optional parameters into Linking.
Note: this post was originally published on February 28, 2019, and subsequently updated on March 14, 2019 to reflect improvements to the workflow. Starting today, you can use as little or as much of the Expo SDK as you like in any React Native app.
You can't. It states this very clearly in the docs:
But no native modules…
The most limiting thing about Expo is that you can’t add in your own native modules without detaching and using ExpoKit. Continue reading the next question for a full explanation.
If you want to use anything that requires react-native link
, then you need to detach your project and then develop it with or without ExpoKit. You will lose certain features and integrations (off the top of my head, I think Push Notifications via Expo is one of them) when doing so, but that is the trade-off Expo provides as an all-in-one package. When detaching, you lose those features.
The answer by Michael is correct, but what if I say there is a way in which you can add a custom native module in expo. You can do things like react-native link, and won't lose anything provided by expo like push notification, over-the-air (OTA) updates provided by expo.
Go through this detailed blog which shows how exactly you can do that. https://codersera.com/blog/running-expo-react-native-together/
Note: They have created a starter kit as well, so you don't need to go through the pain of doing the entire setup by yourself. But even if you have the ongoing project, moving to the starter kit is more of a copy and paste.
Let me know if you have any questions!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With