What is the difference between Expo and React Native?

From Expo Website

Expo allows web developers to create truly native applications that work with both iOS and Android, writing them once in JavaScript.

Isn't that what React Native does? What's the difference?

+138
expo exponentjs
Aug 26 '16 at 16:16
source share
8 answers

I work at Expo!

When you write code in Expo you write React Native code. Expo consists of two main parts:

1) expo-cli : a developer tool for creating projects, viewing magazines, opening on your device, publishing, etc.

2) Expo client: an application on your phone that allows you to open your projects while you are working on them, without having to go through XCode or Android Studio , and also allows other people to view them too! And if you publish it through expo-cli , people will be able to access it at any time through the Expo client on Android or iOS, if they log into the same account with which it was published. Finally, we also provide the ability to create standalone applications so people don’t have to open the Expo client, and you can distribute them in the app store and play store if you want.

So, Expo is a set of tools built on top of React Native . These tools depend on one key belief that we hold at Expo : you can create most applications without writing your own code, provided you have the full set of APIs available for Javascript .

This is important because with React Native you can always upgrade to native code. Sometimes this is incredibly useful, but it is expensive: you need to send people your binary files if you want them to test them, someone in another part of the world can’t just click on the link to open it while working on it, and you can’t just publish it with one click so that someone can access it, like in a browser.

With Expo we recommend that you try not to switch to native code if you can. As I mentioned above, we think that with the full set of APIs available for Javascript , this should not be necessary for most applications. So, we strive to provide this comprehensive set of APIs, and then create all the amazing tools that can exist in a world where their own runtime is shared.

However, if you find that you are absolutely ExpoKit , that you can ExpoKit to ExpoKit , you can use ExpoKit to continue to use the native APIs that Expo provides you, while at the same time having the same level of control as in any native project . " ExpoKit is an Objective-C and Java library that allows you to use the Expo platform and your existing Expo project as part of a larger standard native project." Find out more here.

+170
Aug 26 '16 at 16:21
source share

I tried to make a summary of the documentation and answers of the Expo staff:

React Native init:

Advantages :

  • You can add your own modules written in Java / Objective-C (perhaps the only, but the most powerful)

Disadvantages :

  • Requires Android Studio and Xcode to run projects
  • You cannot develop iOS without having a mac
  • The device must be connected via USB in order to use it for testing.
  • Fonts must be imported manually in Xcode
  • If you want to share this application, you need to send the whole .apk / .ipa file
  • Does not provide JS APIs out of the box, such as Push-Notifications, Asset Manager, they must be manually installed and associated with npm, for example
  • Proper setup of a working project (including device configuration) is quite complicated and can take time

Expo

Advantages :

  • Setting up a project is simple and can be completed in minutes
  • You (and other people) can open a project while working on it.
  • Sharing the application is easy (using a QR code or link), you do not need to send the entire .apk or .ipa file
  • No assembly required to run the application
  • Integrates some basic libraries into a standard project (Push Notifications, Asset Manager, ...)
  • You can bring it to ExpoKit and integrate your own code while continuing to use some Expo features, but not all of them
  • Expo can create .apk and .ipa files (distribution in stores is possible using Expo)

Disadvantages :

  • You cannot add your own modules (perhaps for some of them the gameplay)
  • You cannot use libraries that use native code in Objective-C / Java
  • The standard Hello World app is around 25 MB (due to integrated libraries)
  • If you want to use: FaceDetector, ARKit o Payments, you must throw it on ExpoKit
  • Extracting it to ExpoKit has a trade-off of Expo functions, for example, you cannot share using a QR code
  • When you drop ExpoKit, you are limited to the reactive version supported by ExpoKit at this point in time
  • Debugging in ExpoKit (with native modules) is much more difficult, as it mixes two languages ​​and different libraries (official Expo support no longer exists)

I hope I could summarize the most important points. Feel free to add extra points.

Sources: https://code.tutsplus.com/tutorials/detaching-expo-apps-to-expokit-concepts--cms-30661 https://github.com/react-community/create-react-native-app/ issues / 516 # issuecomment-373629114 https://docs.expo.io/versions/latest/guides/detach.html (official documentation as a whole)

+55
Mar 16 '18 at 15:44
source share

This is explained in the official documentation of the Expo.

What is the difference between Expo and React Native?

Expo is kind of like Rails for React Native. Many things are set up for you, so it’s quicker to get to work and choose the right path.

With Expo, you do not need Xcode or Android Studio. You simply write JavaScript using any text editor that suits you (Atom, vim, emacs, Sublime, VS Code, which you like). You can run XDE (our desktop software) on Mac, Windows, and Linux.

Here are some of the things that Expo gives you out of the box that work right away:

Support for iOS and Android

You can use applications written in Expo on iOS and Android right out of the box. You do not need to go through a separate assembly process for each. Just open any Expo application in the Expo Client application from the App Store on iOS or Android (or in a simulator or emulator on your computer).

Push notifications

Push notifications work right out of the box on iOS and Android, using a single unified API. You do not need to configure APNS and GCM / FCM or configure ZeroPush or anything like that. We think we made it as easy as possible right now.

Facebook Login

It may take a long time to properly configure yourself, but you should be able to configure it in 10 minutes or less at Expo.

Instant updating

All Expo applications can be updated in seconds by simply clicking Publish to XDE. You do not need to configure anything; it just works that way. If you do not use Expo, you can use Microsoft Code Push or offer your own solution to this problem

Asset Management

Images, videos, fonts, etc. dynamically distributed over the Internet with Expo. This means that they work with instant updates and can be changed on the fly. Expo's built-in asset management system ensures that all assets in your repo are uploaded to CDN so that they are quickly loaded for everyone.

Without Expo, the usual thing is to combine your assets into your application, which means that you cannot change them. Or you need to place your assets yourself in a CDN or similar.

Simplified upgrade to new native React versions

We make new issues of Expo every few weeks. You can use the old version of React Native if you want, or upgrade to a new one without worrying about rebuilding the application binary. You may worry about updating JavaScript at the time.

But no native modules ...

The most restrictive thing about Expo is that you cannot add your own native modules without disconnecting or using ExpoKit.

+20
Mar 26 '17 at 22:36
source share

Brent Watne's answer is good, but I would like to add some details.




Expo Extends React Native API

React Native does not provide you with all the necessary JS APIs out of the box, but provides only the most primitive features. React Native developers are expected to use Android Studio / XCode to link additional native libraries. Expo aims to improve RN and provide the entire JS API needed for the most common needs. Basically, this is a set of clearly defined high-quality native libraries that are already packaged for you into one library: ExpoKit. Sometimes these libraries already exist in the RN world and are integrated into ExpoKit.

It is also important to note that the Expo team cannot include every library in ExpoKit (which may cause some frustration), because the size of the hello world application will grow, because it will supply many APIs that will not be used in most applications.

Expo Provides JS Wireless Updates

Like other systems (CodePush ...), Expo provides a system for updating your application wirelessly. This means that you download your JS package to the CDN, and mobile applications automatically download and use the new JS the next time you start (without requesting publication / review in stores).

Expo provides a CLI tool for loading / managing JS packages on their CDN. For development, you can also become a CDN and host the JS package on localhost. And XDE is just a visual wrapper for the CLI.

Expo provides a common customer

The Expo client is a shared client that allows you to download any Expo compatible application. All Expo applications have the same built-in runtime (RN + ExpoKit), the only difference is that we give them JS. The Expo apps you publish in app stores contain the URL of your JS package. The Expo client is built in a special way, so you can choose which URL to load JS from by scanning QRCode or providing the URL.

Please note that this client can also download JS packages from the local host and simplify the development process: there is no need for Xcode or Android Studio, and it launches your first Hello World on the phone much faster (from hours to minutes). You can develop on an iPhone without a Mac, and the installation takes 2 minutes.

In fact, since the Expo SDK can be updated, the Expo client includes a compatibility layer that allows you to run the latest 5 versions of the SDK.

Expo provides assembly service

Since all Expo applications use the same native code, Expo can easily create these applications for you. They created a cloud build service.

The main thing that distinguishes the 2 applications created by Expo is simply the hard-coded URL at which the application must download the JS package to run.

Expo does some other things for you, such as providing a declarative way to configure application icons, orientations, permissions, API keys, help in setting up push notifications, providing profiles ... many parameters must be hard-set during assembly in the application and may not can be changed by air.

Expo is “Responsive to the Native,” like Phonegap for Cordoba

React Native is similar to Cordova. This is not the same presentation technology (native or web version), but both allow you to control native functions from javascript, and both offer a plug-in system so developers can easily add new JS / native bindings.

MOVIES SIMILAR TO Expo They both try to enrich the crude API of the underlying platform on which they are built, using a predefined set of additional native plugins. PhoneGap also offers a build service and has a universal client that works while you use approved plugins.

Conclusion

As you can see, Expo is a toolbox. In the end, it makes it easy to develop, share and publish your mobile projects in stores. This is very similar to the PhoneGap experience (but much better and less confusing).

I will definitely recommend Expo for any new React Native project, except for these two cases:

  • You already know that you need an API that is not in Expo and that will be available soon
  • You really care about the size of your application (HelloWorld is> 25 MB due to the large size of ExpoKit, but after that it does not increase much since it is just JS)
+13
Jan 15 '18 at 21:46
source share

EXPO CLI

Pros: -

  1. No need to install Android studio and Xcode for start building mobile app. 2. No requirement of high configuration machine for development. 3. Mobile ui easily check on both devices android and iphone using barcode scanning.and some time you can check on online iphone and android simulators. 4. fast development. 

Minuses: -

  1. Native dependency can not add on expo because expo project don't have ios and android folder so here expo is bounded. 2. Making apk and ipa are to difficult using expo. 3. Size of the apk/ipa is huge 

Respond to a native client

Pros: -

  1. Easily add native dependency for android and ios because this project structure have ios and android folder. 2. Apk and ipa build making is easy rather than expo. 

Note":- React Native cli is right approach to started work on react native framework.

Minuses: -

 1. High configuration machine is require. 2. Adding dependency some time more difficult but good. 3. Required basic knowledge of android folder structure and ios folder structure but from this learn more things. 

You may prefer any approach to suit your requirements.

+5
Mar 30 '19 at 12:55
source share

The answers about the pros and cons of expo and response-native-cli are complete. I want to mention one more point as my personal experience. Expo by default contains many modules in the project, which makes it easier to work with it. But he has a big problem at the production stage, because the built-in versions of android and ios are so big. For example, if you have one page with 'Hello World' , the apk file size will be about 19 MB . Having the same project in Reaction-native-Cli will lead to the creation of a 6 MB application.

Therefore, I personally do not recommend using expo if you want to develop a commercial application.

+2
Aug 28 '19 at 19:23
source share

I would like to point out that Expo uses an older version of reaction 16.5, which prohibits you from using the new hook function. If you decide to go with Expo, be careful and keep track of your control versions. Older versions, for example, are responsive to navigation, must be used with version 16.5 if you get strange errors.

+1
Apr 15 '19 at 16:11
source share

expo is a toolkit built on top of React Native to help you get started quickly. It provides a set of tools that simplify the development and testing of the React Native application and interface, as well as the interfaces and services that are commonly available in third-party native React Native components. With Expo, you can find them all in the Expo SDK.

-one
Jul 11 '19 at 5:37
source share



All Articles