React.js taught you how to build a framework for new projects

1, install node.js

 node.js official website: https://nodejs.org/en/

Depending on the installation prompts to install node.js, npm package management tools will be installed together.

    After the installation is complete, open cmd command line input node -v and npm -v to view the version number, if the display is installed.

 2. Create a new project with npm , first with npm install the create-react-app tool, it can automatically create react projects in the local directory.

In the cmd command line, type: 

npm install -g create-react-app

Wait for it to install, meaning that the global installed create-react-app scaffolding tools, then you can use the command to create a new project react.

3, in cmd Input:        

create-react-app my-new -app      then you will say wait "a few minutes", must have patience patience Oh!

 

After the installation is complete, follow the prompts:

 

 4, npm start after starting the project, the browser input:HTTP: // localhost: 3000 /   can occur

 

Want to help are watching you, any question, please leave a message in the comments area.

 

Guess you like

Origin www.cnblogs.com/CinderellaStory/p/11848032.html