初始化一个react项目
npx create-react-app my-react-app . 搭建reacte脚手架 cd my-creact-app 进入你创建的reacte项目 npm run start 自动启动react项目
创建过程中出现模板拉不全的现象 需要先卸载create-react-app npm uninstall -g create-react-app
创建
1.通过 npx 创建: npx create-react-app my-app
2.通过 npm 创建: npm init react-app my-app
3.通过 yarn(0.25+) 创建: yarn create react-app my-app