使用 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/即可
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/即可