安装
create-react-app
全局引入包
npm install -g create-react-app
安装项目
npx create-react-app projectName
问题记录
create-react-app :无法加载文件 C:\Users\Administrator\\npm\create-react-app.ps1,因为在此系统上禁止运行脚本
解决
set-ExecutionPolicy RemoteSigned // 选A
同时安装 TypeScript
使用 typescript 模板
npx create-react-app my-app --template typescript