preface

There are many tools for developing RN, and there are many choices. Common ones are:

  • WebStorm
  • Sublime Text 3
  • VS Code
  • Nuclide
  • other

This article takes Webstorm as an example

Use Webstorm to develop React Native

Note: The React Native development environment has been configured by default, such as installing the JDK,Android SDK,Python,Node, and React-Native CLI.

Webstorm installation hack please do your own baidu.

New React Native project

In the picture below, select React Native on the left, and there are three options in the New Project on the right:

  • Location: The Location where the project is stored
  • Node Interpreter: Node location (selected by default after installation)
  • React Native: React-native CLI location (default after installation)

React Native build process

When React Native is built, the build process is displayed. If Done is displayed, the project is built

When the build is complete, files will appear under the project

  • Android folder: develop Android corresponding project directory
  • IOS folder: development IOS project directory
  • Node – modules: project depend on class libraries Other such as: App. Js, App. Json, package, such as json to the schematics

Configuring RN

Click the position as shown in the picture, and in the dialog box that pops up, modify Name(for example, the picture Name is RN)

  • Name: The modified Name to be displayed
  • Target Platforms: Platforms to run on: Android or IOS

RN is modified as shown in the following figure, and the runnable button appears

Click the button as shown to run the project

Note: Please run the simulator or mobile phone first

Running effect

Originally published: March 02, 2018

This article source CSDN blog if need to reprint please contact the author urgently