If you are familiar with React Native, this guide will help you understand the key differences between Expo and React Native.
This guide is intended to give developers who have already used React Native a quick outline of some of the key concepts, resources, and differences they will encounter when using Expo.
You can use just about every part of the Expo SDK in any vanilla React Native app - we call using the Expo tools in this context the "bare" workflow. It's no different than using libraries in your React Native app, we just offer a lot of well-tested, consistent, and increasingly comprehensive libraries that give you access to the underlying native APIs.
The Expo managed workflow provides a shared native runtime so you don't write native code, you focus on writing your React app in JavaScript. You don't have to worry about Android or iOS specific settings, or even opening up Xcode. Managed Expo projects have their own workflow including Expo CLI (a command line interface) to make developing and deploying easy.
Expo extends the React Native platform by offering additional, battle-tested modules that are maintained by the team. This means you're spending less time configuring and more time building.
react-native-maps
, you'll appreciate when things just work.Managed Expo projects also offer updates and a push notification service.
eas update
. You aren't limited to text either, this applies to assets like images and configuration updates too!Expo offers a shared configuration file we call a manifest.
We talk about permissions we set within app.json, but there's also the Permissions API. Permissions inside app.json are meant to be used by Android standalone apps for things like camera access, geolocation, fingerprint, etc. The Permissions API on the other hand, is used to request and verify access at runtime. It offers an easy API for asking your users for push notifications, location, camera, audio recording and contacts.
Since you write your code in JavaScript, we bundle it up and serve it from S3. Every time you publish your app, we update those assets and then push them to your app so you've always got an up-to-date version.
Apps are served from Expo CLI through a tunnel service by default (we currently use ngrok for this) -- this means that you don't have to have your device connected to your computer, or to even be in the same room or country (or planet? I guess it should work from space) as the development machine and you can still live reload, use hot module reloading, enable remote JS debugging, and all of those things you can do normally with React Native. One caveat to this is that using a tunnel is a bit slower than using your LAN address or localhost, so if you can, you should use LAN or localhost. See how to configure this in Expo CLI.
adb logcat
or the iOS equivalent -- the console.log / warn /error
messages from any device that is connected to your app will show up automatically in your terminal.When you're ready, you can run eas build --auto-submit
using EAS CLI to both build your app and automatically upload the binary for distribution on the Google Play Store and Apple App Store.
When developing a managed Expo project, you have the option to use command line tools instead. Here are some of our friends' favorite commands and workflows:
# start expo server, clear cache, load only on localhost and open on iOS simulator
-
expo start -c --localhost --ios
# start expo server (don't clear cache) and run expo on a tunnel so you can share it with anyone!
-
expo start --tunnel
# send a link to a friend's email so they can view on their phone exactly what I'm working on
-
expo send -s example@domain.com