DEV Community

Cover image for Create your first react native app with expo as a beginner.
Gautham Vijayan
Gautham Vijayan

Posted on

Create your first react native app with expo as a beginner.

In this post I will tell you how you can create your first React Native app with expo-cli.

As an advocate for cross platform development I am going to create a series of posts on React Native mobile app development and this post is a part of it.

Go to the app store in your mobile and download the expo app with the link given below,

Expo app link

chrome-capture (54)

After downloading it sign-up/sign-in into the app.

Then go to your terminal in your laptop and install expo-cli globally like below,


npm install -g expo-cli

Enter fullscreen mode Exit fullscreen mode

Then create your react-native-app with,


expo init projectname

Enter fullscreen mode Exit fullscreen mode

Screen Recording 2020-12-02 at 12.02.04.45 PM

It will take some time to install all the dependencies.

Now after installing an expo app, cd into your project folder.

cd project
Enter fullscreen mode Exit fullscreen mode

Then run any one of the command given below based on your phone's operating system,

npm run android
Enter fullscreen mode Exit fullscreen mode
npm run ios
Enter fullscreen mode Exit fullscreen mode

After you run any one of the above commands, you will be redirected to a page like below.

chrome-capture (23)

You can either scan the QR code shown in the redirected with your expo app in your phone or plugin your mobile phone in to your laptop with an usb cable and the app will be built on your mobile and will display the app.js content in it.

And that's how easy it is to create a react native mobile app with expo and build it on to your mobile.

In my next post I will discuss about the React Native elements like View, Text etc.,

Thank you for reading!!

Check out my portfolio: Gautham's portfolio

Check out my blog: coding-magnified.tech

My Other Articles:

Top comments (3)

Collapse
 
varghesejose2020 profile image
Varghese Jose

React native cli is good for production

Collapse
 
gautham495 profile image
Gautham Vijayan

Yes expo bloats the app to minimum 25mb.

I will do a post on react-native cli after completing this beginner series on expo.

Collapse
 
varghesejose2020 profile image
Varghese Jose

Ok