Home  >  Article  >  Web Front-end  >  How to create a react project in webstrom

How to create a react project in webstrom

藏色散人
藏色散人Original
2020-12-03 10:36:413212browse

How webstrom creates a react project: first install webstorm and react.js; then open the software interface, click "File" - "New Project" - "React APP" in the top navigation bar; finally fill in " "Project name" and other relevant information.

How to create a react project in webstrom

The operating environment of this tutorial: Windows 7 system, webstorm2020.2 version, Dell G3 computer.

Recommendation: "javascript basic tutorial"

1. Before you want to use react.js, node.js needs to be installed on the computer. If it is not installed, you must first go to the official website or other channels to download and install it and configure the environment. Then enter the following command in the command window to download the create-react-app scaffolding toolkit:

npm install -g create-react-app

2. After installation, let’s install the webstorm tool.

3. After successful installation, open the software interface and choose to create a new project. The name of the new project here is demo1:

## 4. After waiting a moment for the project to be created, we only need to enter in the Terminal window:

npm start

5. Start successfully

6. At this time, we enter: http://localhost:3000/ on the browser to see the startup interface.

React.js å®è£æç¨å¾ç

At this point, we have created and started the project. If you need to write any pages yourself, you can edit

on the index.js page and open the browser to see the effect of your edit.

The main thing is that if we want to write React.js, then the React package and Component must be introduced at the head of the file.

import React,{Component} from 'react';
import ReactDOM from 'react-dom';

The above is the detailed content of How to create a react project in webstrom. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn