Create and Run React Native Mobile App Using Expo in Under 5 Minutes!

Create and Run React Native Mobile App Using Expo in Under 5 Minutes!

2 min read · 387 words · Shared August 9, 2021 by

Article Summary: Create a cross platform ios and Android app using React Native and run it using Expo.

What Is React Native?

React Native is a JavaScript framework for building cross platform mobile apps. It allows you to create native apps for Android and iOS using React.

For the website: React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces.

In this tutorial, I’ll show you how to quickly set up a React Native project and run your app on your actual device!

Expo

In this tutorial, we will be using Expo with React Native. Expo acts as a container around the React Native framework that allows us to develop applications more quickly and easily compared to if we were using bare bones React Native. The first thing we need to do is install the Expo CLI command line utility. Open your terminal and run the following command:

npm install -g expo-cli

Now we can create a new React Native project. I will call my project ExampleProject but you can call it whatever you like.

expo init ExampleProject

Expo will prompt you with the following message:

React Native Expo template options
View Full Image

·

React Native Expo template options

For this tutorial, I will select blank but I encourage you to do some research and select the best option for your project.

Running Our React Native App On Expo

Believe it or not, our app is ready to be run! To start our app we must move into the folder which contains our app and then run the start command.

cd AwesomeProject
npm start

When you run ‘npm start’, a new browser window will open at your local host. You will notice a barcode in the lower left hand corner.

Expo running in browser
View Full Image

·

Expo running in browser

We can scan this barcode in the expo app to run our app on a device. Go to either the Apple App Store or the Google Play Store and search for ‘expo client’. See the image below.

Expo in google play store
View Full Image

·

Expo in google play store

Once you download and open the app, you will see an option to “Scan QR Code”. Tap this and scan your code. After the JavaScript loads, you should be able to see the app on your device. If you see “Open up App.js to start working on your app!” you have done it correctly.

Edit on GitHub

Related Tags

    #react-native

On This Page

What Is React Native?

Expo

Running Our React Native App On Expo

No related posts! Like react-native? Try writing about it.


Loading author data...

    Legal

    Terms

    Disclaimer

    Privacy Policy


    Carlson Technologies Logo© Copyright 2021 - 2024, Carlson Technologies LLC. All Rights Reserved.