React Long Learning Road of Create a React app with the Create React app command

Source: Internet
Author: User

The so-called beginning of everything is difficult, the purpose of this article is to explore react students, the establishment of the first basic react application.

The Create React app is one of the official Facebook scaffolding tools to quickly build a new React single page app that can help you configure your development environment so you can use the latest JavaScript features, provide a great development experience, and optimize your app for your production environment. (If you've used VUE-CLI to build a Vue app, here's an analogy)

Words don't say much, just start.

Installation

Global Installation Create-react-app

NPM install-g Create-react-app

Tips: If the installation fails, update node and NPM to the latest version retry

Create a new app
Create-react-app my-App

A My-app folder is created under the current directory with the following directory structure:

my-public│   └──favicon.ico│   └──index.html│   └──manifest.json└──src    └── App.css    └──app.js    └──app.test.js    └──index.css    └──index.js    └──logo.svg    └── Registerserviceworker.js

Run
CD my-appnpm start//or yarn start

Enter the My-app directory to run NPM start or yarn start

The default browser access http://localhost:3000 is turned on (if the browser does not open automatically, you can access the http://localhost:3000 manually)

Next you can create your own app by modifying the Index.js file!

React Long Learning Road of Create a React app with the Create React app command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.