Skip to main content

Command Palette

Search for a command to run...

Installation react-native for cross platform mobile development.

Published
2 min read
J

I'm developer from Bangladesh.

React-native is a wonderful popular mobile building framework. React-native allows developers to use JavaScript & TypeScript with Reactjs to build apps for both iOS and android platforms. In this blog, we'll learn several ways to install and set up React Native environment, depending on your machines.

  1. Installing React Native using React Native CLI :

React-native (CLI) Command Line Interface is the recommended way to install and manage react-native projects. To install React Native using the CLI, you need to have Node.js and npm installed on your machine. Once you have Node.js and npm installed, you can install the React Native CLI using the following command:

npm install -g react-native-cli

After installing the CLI, you can create a new React Native project by running the following command:

react-native init <ProjectName>

This will create a new project with the specified name and install all the necessary dependencies.

  1. Using React Native using Expo CLI:

Expo CLI is another toolchain to create React Native apps. It provides a set of pre-built UI components and modules that can be used to build apps faster. To install React-native with Expo CLI, run this command:

npm install -g expo-cli

Once the Expo install is finished, Create a new project by running the following command:

expo init <Projectname>

This command will create a new project and install the necessary dependencies.

  1. Another good way to install React native using an npm Package manager:

https://www.npmjs.com/package/react-native-starter-kit

you can also install React Native using these tools. To install React Native using Yarn, you can run the following command:

yarn add react-native

To install React Native using npm, you can run the following command:

npm install react-native

In conclusion, React Native can be installed using several different methods, depending on your development environment and preferences. Whether you choose to use the React Native CLI, Expo CLI, a package manager, or a starter kit, the key is to get started building your app and learning the ins and outs of this powerful framework.