一,通过create-react-app脚手架创建项目 安装脚手架 npm install -g create-react-app 安装yarn包管理器 npm install -g yarn 创建项目 npx create-react-app my-app --template ty