Create React App
It is an official React React
scaffolding tool for building single-page applications. It not only integrates Webpack
, but also configures a series of built-in loader
and 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!