第一步:全局安装create-react-app库
npm install -g create-react-app
第二步:切换到想创建项目的目录,使用create-react-app库生成一个新的可运行文件
create-react-app xxx
第三步:进入项目文件夹
cd xxx
第四步:启动项目
npm start