通过 create-react-app 脚手架快速搭建 react 项目
安装 create-react-app
npm install -g create-react-app
检测 create-react-app 是否安装成功
create-react-app -V # 注意:V 是大写的
创建 react 项目
npx create-react-app my-app # 注意:名字不能包含大写字母# 或者# create-react-app my-appcd my-appnpm start
说明:npx 是 npm 5.2+ 附带的 package 运行工具
npx create-react-app my-app --template typescript