1

I'm planning to develop an Mobile App in react-native, as i'm new to this language and i have gone through some react-native tutorial videos in udemy, i just want to know the difference between React Native CLI vs Expo CLI. If we are to develop an iOS and Android application which uses bluetooth, location and camera API's which CLI we should go with ?

I couldn't find any specific libraries (bluetooth, location and camera)from the react-native team, is it that we need to create our own library in native language(Swift or Objective C and Java or kotlin) and expose them to react native through bridging or can we use third party libraries which are already available ?

Thanks.

Madhu
  • 869
  • 1
  • 17
  • 37
  • Basically I always like to go with expo because it helps you in a lot of things. You can use everything like camera or bluetooth in a bare react native project, you just have to install some librarys from the comunity. – yesIamFaded Jun 18 '20 at 08:05
  • [Comapre](https://stackoverflow.com/questions/54862388/what-is-the-difference-between-expo-cli-and-react-native-cli) , [bluetooth](https://github.com/Polidea/react-native-ble-plx) , [Camera](https://github.com/react-native-community/react-native-camera) , [Location](https://github.com/timfpark/react-native-location) – 高鵬翔 Jun 18 '20 at 08:06

1 Answers1

3

What is the difference between Expo and React Native?

Hope this help you :)

As my knowledge:

Expo doesn't support you to go deep into Native Modules. So it means you can't write your Java/Objective-C code for your own purpose.

But if you are just started to React Native, I think expo will bring a lot of advantages for new people, by a lot of supported modules like some of your listed: Camera, Location

But unfortunately, Bluetooth module is currently not support in expo, you if this is a crucial feature of your app, you must use React native CLI.

However, you still can detach your expo app and attach it into your React Native CLI app by using ExpoKit. Still:

The downside of detaching to ExpoKit is that you will have to set up the standard native development environment for React Native!

Another downside is that you're limited to the React and React Native version used by ExpoKit at the time you detach your app. This means that there might be compatibility issues that you will need to resolve if the native module you're trying to install depends on an earlier version of React or React Native.

You can find more here: https://code.tutsplus.com/tutorials/detaching-expo-apps-to-expokit-concepts--cms-30661

Community
  • 1
  • 1
Brian H.
  • 1,603
  • 11
  • 16
  • So if i create my project using Expo CLI, is it possible to eject the expo, then use that project again with react-native CLI and implement bluetooth feature? What are the positives and negatives of ejecting the expo CLI and then using react-native CLI going further. For my learning process i have used Expo CLI most of the time. Was wondering how can i eject and just use react-native CLI. Thanks – Madhu Jun 18 '20 at 10:19
  • Yes. you can, there are a module in expo called `ExpoKit`, you can detach your expo app, then attach it into a stardard `React Native CLI` app, but this approach has some disadvantages. I just update my answer. Hope that help :) – Brian H. Jun 18 '20 at 10:36
  • Great, Thanks @Ryann. Much appreciate your comments. – Madhu Jun 18 '20 at 12:24
  • You're welcome @Madhu. If my answer satisfied you, don't mind give me an upvote :) – Brian H. Jun 18 '20 at 12:42