How to use Expo to develop React Native

Lautaro Gruss
Comunidad JS
Published in
3 min readMay 23, 2017

What is Expo ?

Expo is a set of tools or a framework, that allows Javascript developers to write Native iOS and Android applications, using React Native under the hood.
Using Expo is great, because it wraps Native APIs (written in Objective C or Java) and allows you to interface with JavaScript.

To start using it, first go and download the Expo Development kit.
You will find packages for the system of your preference.
Once downloaded and upon opening the XDE you will be prompted for a username and password, if you don’t have an account, create one.
After logging in the Expo app you’ll see a list of projects you have created with Expo and different buttons to interact with the App.

How can I create an Expo-like project ?

If you create a new React Native project with CRNA (create-react-native-app), you’re ready to go. You’ll find a JSON file which is called app.json that allows you to specify project configurations, using expo as the configuration key.
To see the full list of available configurations, check out the full list.

What can I do with Expo ?

With Expo you can share a link, that let’s you open the App you’re building, right in your phone and get hot reloading right in your device. I’ve never experienced the same before, you can literally hit save in your IDE of choice and see the changes reflected immediately in you physical phone.

Live updates are awesome developer experiences

This is fantastic because it gives you instant feedback on how it looks in a real device, which is an awesome developer experience!

You’ll need to have the Expo App installed on your phone first, so it can understand the exp protocol.

If you want to open your app in a simulator, you can use the Device button, which allows you to open the app in a iOS or Android simulator.

Of course you have the development mode enabled by default, so you can do things like hot and live reloading, the same as React Native allows.

You’ll have a ton of available APIs to work with video, push notifications, gradient, blur, camera, location, permissions, filesystem, and more..

Do you want to publish something ?

When you click the Publish button in XDE, you’ll be asked to confirm that you want your project to be available to the public. XDE takes some time to generate your minified JS bundle and upload your Assets to their servers, and once it’s done, prints out your app’s published URL. You can read more details about how publishing works in How Expo Works and in this blog post.

To recap, Expo is a layer on top of React Native that gives you nice tools to let you focus and build your next awesome native app without the pain of writing specific code for any platform. It takes almost no configuration to start working with, as it was created by developers for developers.
Go and Expo your next React Native App!

--

--