How to install react native in pc: 10 minutes

How to install react native in pc: 10 minutes

install react native react native

React Native

React Native is like React, but it uses native components instead of web components as building blocks. So to understand the basic structure of a React Native app, you need to understand some of the basic React concepts, like JSX, components, state, and props. 

Create React Native App is the easiest way to start building a new React Native application. It allows you to start a project without installing or configuring any tools to build native code - no Xcode or Android Studio installation required

Required software

  • Android Studio (IDE) 
  • Android SDK
  • Java
  • Node Js
  • NPM
  • React native cli
  • Xcode (Create ios application)

Project Structure 

project name 
     android         // Android code
     ios             // IOS Code
     node_modules    // npm packages
     .babelrc        // .babelrc file
     .buckconfig     // .buckconfig file
     .flowconfig     // .flowconfig file
     .gitattributes  // .gitattributes file
     .gitignore      // .gitignore file
     .watchmanconfig // .watchmanconfig file
     App.js          // App.js file
     app.json        // app.json file
     index.js        // index file
     package.json    // package file
     yarn.lock       // yarn file

Installing Command 

After installing required software  open terminal/cmd and run command step by step

Sudo npm install -g react-native-cli

Create starter application

Create default application by using the react native CLI (Command Line Interface):

react-native init 

Serve Browser

After creating the project then run this command to serve application browser:

cd  
react-native start

Run Application emulate/device

Once you have dependencies installed you are ready to run or emulate/device the application:

react-native run-android // run android device
react-native run-ios // run ios device

 

This step Follow to create a hybrid application using the react native.

Thanks :)

 

About the author
Code solution

info@codesolution.co.in

Discussion
  • 0 comments

Add comment To Login
Add comment