React basics --- create a project

Create React AppIt is an official React Reactscaffolding tool for building single-page applications. It not only integrates Webpack, but also configures a series of built-in loaderand default npm scripts. It can easily achieve zero configuration and quickly develop React applications.

1. Install node.js

Check whether node.js is installed globally, window+R opens the cmd command line, and enter node -v to view

View the local node.js installation location: where node

2. Build a project named my-app

npx create-react-app my-app
cd my-app

3. Compile and run the project

# 编译当前React项目,http://localhost:3000
npm start

4. Run successfully and can access the local project

 

Welcome to the one-key triptych, 2021, is your best!

Guess you like

Origin blog.csdn.net/XU441520/article/details/113989716