Create a new React project using scaffolding

create project

first step:

        Execute the following command in the computer cmd command window for global installation

npm i -g create-react-app

Step two:

        Switch to the directory where you want to create the project, use the following command to create the project, hello-react is your own project name

create-react-app hello-react

After a while, it will be created successfully.


Startup project:

The first way: direct start

        Open the project folder with the cmd command

cd hello-react

        Execute npm start to start

npm start

The second way: start in vscode

        Use vscode to open the created project, and directly enter npm start in the terminal, as shown below:

         Press Enter to execute. After successful execution, it will jump to the following page of the browser:

 ok。

Guess you like

Origin blog.csdn.net/m0_59778008/article/details/127208750