29

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.

Ankush Rishi
  • 2,861
  • 8
  • 27
  • 59

2 Answers2

48

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.

Gauravbhai Daxini
  • 2,032
  • 2
  • 22
  • 28
Michael Cheng
  • 9,644
  • 6
  • 46
  • 48
  • 5
    I came here wondering what to do for `@react-native-community/async-storage`. Good news is that it's supported by Expo: https://docs.expo.io/versions/latest/react-native/asyncstorage/ – Gezim Nov 03 '19 at 02:58
0

To achieve this, create a new fresh project with:

npx create-react-native-app

copy your files of components and your dependencies on the new generated project.

The best of both worlds, Expo and React-Native.

More information can be found in the docs: https://github.com/expo/create-react-native-app#usage-with-expo-client-app

dutchsociety
  • 575
  • 4
  • 22
Dante Nuñez
  • 439
  • 4
  • 7