• Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
Tuesday, November 17, 2026
No Result
View All Result
Subscribe Now
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Trump Administration Revokes Pay Increase for Head Start Educators

    Trump Administration Revokes Pay Increase for Head Start Educators

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
The Insight Post
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Trump Administration Revokes Pay Increase for Head Start Educators

    Trump Administration Revokes Pay Increase for Head Start Educators

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
No Result
View All Result
No Result
View All Result
Home Mobile

Create React Native app using Expo CLI or React Native CLI

by Theinsightpost
August 11, 2022
in Mobile
0 0
0
Create React Native app using Expo CLI or React Native CLI


Codemagic builds and tests your app after every commit, notifies selected team members and releases to the end user. Automatically. Get started

Written by Sneh Pandya

Editor’s Note: This post was originally published in August 2020 and has been updated in November 2020.

In this step-by-step tutorial we will show you how to create a React Native project from installing all the needed software and dependencies to ensuring the quality of your React Native app. How to get started with React Native by installing Expo CLI or React Native CLI and install Xcode (for Mac OS) and Android Studio.

In this article you will learn:

  • What is React Native?
  • Expo CLI vs React Native CLI – which one to use?
  • Step 1: Install Expo CLI or React Native CLI
  • Step 2: Install Xcode (for Mac OS)
  • Step 3: Install Android Studio
  • Step 4: Install IDE
  • Step 5: Create your first React Native app from scratch
  • Step 6: Set up React Native project on CI/CD

So, let’s get started, but first, let us know how many mobile app projects do you have in Git repositories?

What is React Native?

React Native is an open-source cross-platform mobile application development framework developed by Facebook in 2015. It is widely used by developers, from advanced developers in Android and iOS to React beginners, and even people who are getting started with programming for the first time in their career. Since its initial release in 2015, popularity of the framework is consistently growing.

Nearly 58% of all respondents on the Stack Overflow Developer Survey 2020 state that they are either using React Native and have expressed interest in continuing to develop apps with it. React Native is considered a preferred alternative of Flutter, an open-source cross-platform mobile application development framework developed by Google. React Native uses messages from the JavaScript thread instead of HTML or CSS. React Native also allows developers to write native code in languages such as Java for Android and Objective-C or Swift for iOS, which makes it even more flexible.

Read more:

>> What is Flutter? Benefits and limitations

>> Flutter vs React Native: A Developer’s perspective

Install React Native: Expo CLI vs React Native CLI

You can either use Windows, Linux or Mac OS to get started with React Native. Both the iOS and Android environments are available on Mac OS, whereas Linux and Windows only support Android environment. We will assume that you are using macOS for React Native development, but you can always follow the similar instructions for Windows and Linux as well.

In general there are two possible ways to get started with React Native:

  • Expo CLI
  • React Native CLI

React Native official setting up the development environment documentation is recommending to use Expo CLI if you are new to app development.

Expo CLI is a safe bet for a new React Native developer, since it has set of tools built around React Native, so that you only need a recent version of Node.js and a phone or emulator to get started within minutes. On the other hand when you use Expo CLI to develop your application you are limited to the Expo ecosystem, which might get burdening once building a very complex app with a lot of manual work around the lot of fine range configuration.

However, then you can easily switch to React Native CLI and no questions asked!

Installing Expo CLI

You will need Node 12 LTS or later on your local machine to use this method. Use npm to install the Expo CLI command line utility:

Installing React Native CLI

For Mac OS

You will need to install Node, the React Native command line interface, a JDK, and either Android Studio or Xcode.

The recommended way is to install Node and Watchman using Homebrew. Run the following commands in a Terminal after installing Homebrew:

brew install node
brew install watchman

Most of the tools come with Xcode. If you have already installed Node on your system, make sure it is Node 8.3 or newer. Watchman is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.

For Windows and Linux

You will need Node, the React Native command line interfa*ce, Python, a JDK, and Android Studio. While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.

React Native has a built-in command line interface. Rather than install and manage a specific version of the CLI globally, we recommend you access the current version at runtime using npx, which ships with Node.js.

With npx react-native <command>, the current stable version of the CLI will be downloaded and executed when the command is run. If you previously installed a global react-native-cli package, please remove it, as it may cause unexpected issues.

Installing Xcode (for Mac OS)

The easiest way to install Xcode is via the Mac App Store. Installing Xcode will also install the iOS Simulator and all the necessary tools to build your iOS app. If you have already installed Xcode, make sure it is version 9.4 or newer.

You will need to install the Command Line Tools for Xcode. Open Xcode, then choose Preferences… from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.

You will also need to install CocoaPods. Use the command below to do that:

sudo gem install cocoapods

Installing Android Studio

Download and install Android Studio. Choose a Custom setup when prompted to select an installation type. Make sure the boxes next to all of the following are checked:

  • Android SDK
  • Android SDK Platform
  • Android Virtual Device

If the checkboxes are grayed out, you will have a chance to install these components later on. You can also install and set up a device or an emulator for Android development.

To find more information for dependencies and softwares, please refer to the React Native documentation here.

Installing IDEs

App development using React Native can be done on any editor or IDE of your choice. You can use IntelliJ, Visual Studio Code, Sublime Text, Atom and more. The choice of editor/IDE is completely up to you. Once we have finished the setup for our favourite editor, we can start developing apps using React Native.

>> Visual Studio Code vs Android Studio – Functionality, Search and Source Control

Create React Native app using Expo CLI

Run the following commands to create a new React Native project named ‘FirstProject’ using Expo CLI:

expo init FirstProject
cd FirstProject
npm start

This will start a development server for you. To run the app, install the Expo client app on your iOS or Android phone and connect to the same wireless network as your computer. On Android, use the Expo app to scan the QR code from your terminal to open your project. On iOS, use the built-in QR code scanner of the Camera app.

Once you’ve set up Android Studio or Xcode, you can launch your app on an Android virtual device or real device using USB by running:

Or on the iOS Simulator (macOS only) by running:

Create React Native app using React Native CLI

Run the following commands to create a new React Native project named FirstProject using React Native CLI:

npx react-native init FirstProject
cd FirstProject
npx react-native start

This will start a Metro Bundler development server for you. Once you’ve set up Android Studio or Xcode, you can launch your app on an Android virtual device or real device using USB by running:

npx react-native run-android

On the iOS Simulator (macOS only) you can do this by running:

You will be able to see the app running in the emulator/simulator or a real device.

Voilà! We have successfully run our first React Native app.

React Native project structure

Now we will understand the directory structure of the React Native app. Here’s how the typical project structure looks like:

The files responsible for project configurations, like package.json, are placed at the root of the project directory. We have separate directories for the iOS and Android apps. __tests__ directory consists of tests that can be run on the project. node_modules is the heart of a React Native application, containing smaller modules for the app. node_modules directory is initialized and the dependencies installed when the project is initially set up. index.js file serves as the main starting point of the application. As the app runs on our device, it starts to serve content placed in the index file. package.json file specifies dependencies and versions for the project. app.json is a simple file that contains the application name.

How to build React Native apps on Codemagic

How to build React Native apps on Codemagic

Start now

Setting up your React Native app on CI

Building React Native apps is relatively complex and cumbersome if you want to do it yourself on the blank server. The React Native stack is versatile, yet it has a lot of tools and components that you need to install before you can actually start the build process. The steps include provisioning installation, installing iOS and Android dependencies, installing module dependencies, etc.

Luckily, Codemagic does all this work for us; simply visit the Codemagic website and register yourself with your GitHub, GitLab or Bitbucket account and point your app to Codemagic or do it here:

Sign up

You can find the getting started guide for React Native to set up your React Native app using Codemagic CI/CD. The default workflow of Codemagic is to build, test and publish the artefacts of your iOS and Android builds. We have our source code of the demo test app flutter testing on Github, we have built the “CI” branch and we are following as a build output without any configuration.

Conclusion

With growing popularity in the domain of cross-platform solutions, React Native continues to leave its mark for the developers and industries keen to make use of it. We hope this article helps you get started with React Native and launch your own apps!

More articles about React Native


Sneh is a Product Manager based in Baroda. He is a community organizer at Google Developers Group and co-host of NinjaTalks podcast. His passion for building meaningful products inspires him to write blogs, speak at conferences and mentor different talents.
You can reach out to him over Twitter (@SnehPandya18) or via email (sneh.pandya1@gmail.com).





Source link

ShareTweetSend
Previous Post

Commissioner Masinde calls on residents to remain calm – Kenya News Agency

Next Post

Dozens missing after migrant boat sinks in Aegean Sea – UNHCR – europeantimes.news

Related News

Unlocking Potential: Exploring the FDE Model in Enterprise AI Solutions
Mobile

Unlocking Potential: Exploring the FDE Model in Enterprise AI Solutions

November 14, 2026
Unlocking the Scoop: Upcoming Sale Dates, Price Highlights, and Previous Bargains
Mobile

Unlocking the Scoop: Upcoming Sale Dates, Price Highlights, and Previous Bargains

November 14, 2026
Unlocking Website Security: The Marketbyte Edge in Open Source Solutions
Mobile

Unlocking Website Security: The Marketbyte Edge in Open Source Solutions

November 13, 2026
Uncovering the Best Solutions for Your Mobile Risk Concerns
Mobile

Uncovering the Best Solutions for Your Mobile Risk Concerns

November 12, 2026
Next Post
Dozens missing after migrant boat sinks in Aegean Sea – UNHCR – europeantimes.news

Dozens missing after migrant boat sinks in Aegean Sea – UNHCR – europeantimes.news

Discussion about this post

Subscribe To Our Newsletters

    Customer Support


    1251 Wilcrest Drive
    Houston, Texas
    77042 USA
    Call-832.795.1420
    e-mail – news@theinsightpost.com

    Subscribe To Our Newsletters

      Categories

      • Africa
      • Africa-East
      • African Sports
      • American Sports
      • Arts
      • Asia
      • Australia
      • Business
      • Business Asia
      • Business- Africa
      • Canada
      • Defense
      • Education
      • Egypt
      • Energy
      • Entertainment
      • Europe
      • European Soccer
      • Finance
      • Germany
      • Ghana
      • Health
      • Insight
      • International
      • Investing
      • Japan
      • Latest Headlines
      • Life & Living
      • Markets
      • Mobile
      • Movies
      • New Zealand
      • Nigeria
      • Politics
      • Scholarships
      • Science
      • South Africa
      • South America
      • Sports
      • Tech
      • Travel
      • Travel-Africa
      • UK
      • USA
      • Weather
      • World
      No Result
      View All Result

      Recent News

      Gators Shock Wildcats 21-14 in Thrilling Upset Amid Rollercoaster Season

      Gators Shock Wildcats 21-14 in Thrilling Upset Amid Rollercoaster Season

      November 15, 2026
      Government Announces Historic  Billion Investment in Energy Infrastructure Development

      Government Announces Historic $2 Billion Investment in Energy Infrastructure Development

      November 15, 2026
      Notre Dame Postgame Insights: Dive into Superchats with Westwood One Sports

      Notre Dame Postgame Insights: Dive into Superchats with Westwood One Sports

      November 15, 2026
      Transform Your Laptop Setup with These 5 Affordable Accessories

      Transform Your Laptop Setup with These 5 Affordable Accessories

      November 15, 2026
      • Home
      • Advertise With Us
      • About Us
      • Corporate
      • Consumer Rewards
      • Forum
      • Privacy Policy
      • Social Trends

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      Welcome Back!

      Login to your account below

      Forgotten Password?

      Retrieve your password

      Please enter your username or email address to reset your password.

      Log In

      Add New Playlist

      We are using cookies to give you the best experience on our website.

      You can find out more about which cookies we are using or switch them off in .

      No Result
      View All Result
      • Home
      • Insight
      • Blog
      • Business
      • Entertainment
      • Health
      • Politics
      • Shop
        • Gift Shop
        • Value Shop
        • Store
        • Bargain Shop
        • Discount
      • Sports
      • Tech
      • Travel
      • USA
      • Video
      • World
        • Asia
        • Africa
        • South America
        • North America
        • Europe
        • Oceania

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      The Insight Post
      Powered by  GDPR Cookie Compliance
      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      Cookie Policy

      More information about our Cookie Policy