React Getting Started Booklet (1) Installing and Configuring React Development Environment

  • Before starting React development, Node.js and a good code editor (like Visual Studio Code) need to be installed.

  • After downloading and installing Node.js on Windows or Mac, open a command line or terminal to verify that it was successfully installed. Enter node -v, if the version number is displayed, it means that Node.js has been successfully installed. You also need to make sure that npm is installed. (Note: If you cannot access the official website, please use Taobao's npm warehouse)

  • Once you've done that, you'll be able to create a React app that runs locally.

  • One easy way is to use Create-React-App. Before creating a new React application, we also need to install the create-react-app plugin globally (using node), command line input

  • npm install -g create-react-app

Finally, create a new React application by typing the following at the command line:

npx create-react-app my-app
cd my-app
npm start

This will create a React application named my-app and start the development server to run react app in the browser.

Happy learning!

Guess you like

Origin blog.csdn.net/weixin_42657666/article/details/129565992