Create React App scaffolding installation

Recat use requires scaffolding to provide official development. Node requires version> = 8.10 and npm version> = 5.6.

Use npm installed, first npm init -y initialized. Package.json will generate a file.

Then execute:npx create-react-app my-app

note,

 npx Not a typo - it is a  package that comes with running tool npm 5.2+ .

my-app was created out of the file name.

After the installation is complete in order to generate a file called my-app folder.

Continue: cd my-app

Enter my-app file folder execute command: npm start

It will automatically open a browser and access to the local port 3000. Page is as follows

 

 

React successful installation, project development can be happy friends ~

 

Guess you like

Origin www.cnblogs.com/hhhhhedy/p/11545350.html
Recommended