React using the create-react-app scaffolding to build the project from scratch

First, install

  npm install -g create-react-app

  Version check: create-react-app --version

 

Second, create a project

  create-react-app npm default call instruction, then directly to the register npm to permanently set up like, or used as such cnpm npm no differences. Creating a project will be much faster speed

config npm the SET Registry HTTPS: // registry.npm.taobao.org 
- After configuration can be verified by the success of the following ways 
npm config GET Registry
 - or npm info express

 

  create-react-app my-app

  cd my-app/

  Elevation start

  By HTTP : // localhost: 3000 / view your app

  Use npm run build compiler package program

Guess you like

Origin www.cnblogs.com/LChenglong/p/11112568.html