安装脚手架 cnpm install -g create-react-app 创建项目my-app 方法一 yarn create react-app my-app 方法二 npx create-react-app my-app 方法三 npm init react-app my-app