使用 create-react-app 快速构建 React 开发环境

使用 create-react-app 快速构建 React 开发环境

cnpm install -g create-react-app  // 全局安装create-react-app,如果不想全局安装,则不要-g
create-react-app my-app  // my-app是项目名
cd my-app
npm start  // 启动项目

浏览器运行http://localhost:3000/即可

你可能感兴趣的:(React,react,搭建react环境)