react 项目创建
方法一
$ cnpm install -g create-react-app
$ create-react-app my-app
方法二
npx create-react-app my-app
npm start
启动开发服务器。
npm run build
将应用程序捆绑到静态文件中以供生产。
npm test
启动测试运行程序。
npm run eject
删除此工具并复制生成依赖项、配置文件
方法一
$ cnpm install -g create-react-app
$ create-react-app my-app
方法二
npx create-react-app my-app
npm start
启动开发服务器。
npm run build
将应用程序捆绑到静态文件中以供生产。
npm test
启动测试运行程序。
npm run eject
删除此工具并复制生成依赖项、配置文件