DEV Community

Shiva
Shiva

Posted on

Creating a React Native Mobile App with React Native CLI

Image description

A complete step-by-step guide to create a React Native App.

Step 1:

Create a folder for your project - for example, ReactNativeProjects .

Image description

Step 2:

Right-click on the folder, select the "Open in Terminal" option.

Image description

Step 3:

In the terminal, to create a React Native app, run the following command:
npx @react-native-community/cli init YourAppName

I'm creating an app named FirstApp:
npx @react-native-community/cli init FirstApp

Image description

Step 4:

In Visual Studio Code, click on "Open Folder" from the menu and select your app folder (YourAppName).

Image description

Image description

Step 5:

To run your app, connect the physical device or set up emulator.

Step 6:

In Visual Studio Code, open the terminal.

To run your app on android, use the following command:
npx react-native run-android

Image description

To run you app on iOS, use the following command:
npx react-native run-ios

Step 7:

It's time to write your code and explore the app.

Image description

Top comments (0)