Expo vs React native

What is the difference between React Native and Expo?

Ina HranovaIna Hranova 3 minutes 226 views

Share:

In this post, I will be showing you guys what is the difference between React Native and Expo?

React Native is an open-source mobile application framework created by Facebook for creating performant iOS and Android apps. Facebook groups, with their millions of users, are powered by React Native as well as Facebook Ads Manager. Airbnb, Bloomberg, Tesla, Instagram, Ticketmaster, SoundCloud, Uber, Walmart, Amazon, and Microsoft are some of the other companies using React Native in production.

Expo is a free and open-source tool built around React Native that you can build native iOS and Android projects using JavaScript and React. It provides a set of tools that simplify the development and testing of the React Native app, besides that expo provides more robust and developer-friendly development. Expo is just built on top of the React Native framework.

For React Native

React Native

Advantages:

  • You can add native modules written in Java/Objective-C
  • You should be having control over the builds.

Disadvantages:

  • You should have Android Studio and XCode to run the projects. Read how to run React Native app with Xcode
  • You can’t develop for iOS without having a macOS
  • Fonts need to be imported manually in XCode
  • If you want to share the app you need to send the whole .apk / .ipa file
  • Does not provide JS APIs out of the box, e.g. Push-Notifications, Asset Manager, they need to be manually installed and linked with npm for example
  • Setting up a working project properly (including device configuration) is rather complicated and can take time

For Expo

Expo

Advantages

  • Setting up a project is easy and can be done in minutes.Read  how to add Expo in your Mac OS.
  • You can open the project while you’re working on it
  • Sharing the app is easy via QR-code or link, you don’t have to send the whole .apk or .ipa file
  • No build necessary to run the app
  • Integrates some basic libraries in a standard project (Push Notifications, Asset Manager,…)
  • You can eject it to ExpoKit and integrate native code continuing using some of the Expo features, but not all of them
  • Expo can build .apk and .ipa files

Disadvantages

  • You can’t add native modules written in Java/Objective-C
  • You can’t use libraries that use native code in Objective-C/Java
  • The standard Hello World app is about 25MB big because of the integrated libraries
  • Ejecting it to ExpoKit has a trade-off of features of Expo, e.g. you cannot share via QR code
  • When ejecting to ExpoKit you are limited to the react native version that is supported by ExpoKit at that point in time
  • Debugging in ExpoKit (with native modules) is a lot more complicated since it mixes two languages and different libraries (no official Expo support anymore)