搭建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/

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/haogeoyes/article/details/84313954
今日推荐