Create and Run React Native Mobile App Using Expo in Under 5 Minutes!
Use Expo to create a React Native app fast!
What Is React Native?
Learn once, write anywhere.
In this tutorial, I’ll show you how to quickly set up a React Native project and run your app on your actual device!
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:
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.
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.
Published on August 09, 2021 (1 month ago) in
Was this snippet helpful?
Written By Benjamin Carlson