1. 程式人生 > >搭建react環境

搭建react環境

安裝
npm install -g create-react-app
建立專案
create-react-app my-app
建立成功


Success! Created hi at D:\git\learn\webpack\react\hi
Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd hi
  npm start

Happy hacking!

啟動

cd hi
npm start

http://localhost:3000/

在這裡插入圖片描述