REACT is a learning experience: nodejs download and install react in

table of Contents

1: Download and install

1 Downloads:

2: Instead of using cnpm npm

3: Install yarn

2: build react development environment

 1: Method using the old (Scaffolding: crate-react-app)

    1: Install scaffolding (only installed once on the line)

2: Create a Project (you can create multiple)

 2: the use of new approaches (npx) without having to install scaffolding work

1; nodejs versions greater than 6.0, npm version greater than 5.2

2:npx create-react-app reactdemo03

3:cd reactdemo03

4: Start altitude


 

1: Download and install

1 Downloads:

Installation detects the version: 

Installed by default npm (node ​​package management tool)

2: Instead of using cnpm npm

Because npm sometimes very unstable, so we need to replace cnpm npm (cnpm is Taobao to solve the problem npm server abroad created)

1: Search in Taobao Baidu cnpm

 

2: Run in cmd:

npm install -g cnpm --registry=https://registry.npm.taobao.org

3: Complete the installation 

3: Install yarn (yarn is get together facebook and other companies)

cmd execute command: npm install -g yarn

 

2: build react development environment

 1: Method using the old (Scaffolding: crate-react-app)

    1: Install scaffolding (only installed once on the line)

        Execute in cmd: npm install -g create-react-app

2: Create a Project (you can create multiple)

First find the directory of the project

Execution: create-react-app reactdemo2

Success Show:

 3: Run

cd to the project

npm start / yarn start: Run the project

npm run build / yarn build: build the project

This appears to indicate success 

 2: the use of new approaches (npx) without having to install scaffolding work

1; nodejs versions greater than 6.0, npm version greater than 5.2

2:npx create-react-app reactdemo03

3:cd reactdemo03

4: Start altitude

 

Published 57 original articles · won praise 15 · views 40000 +

Guess you like

Origin blog.csdn.net/qq_41694906/article/details/101287897