创建一个 React 项目有好几种方法,但是我唯独喜欢搭建本地开发环境的这种方式去创建。 // 创建 react 项目 npx create-react-app my-app // 进入到项目目录 cd my-app // 启动项目 npm start