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

在终端执行以下命令创建项目:

 

1、指定创建的项目位置(这里以桌面为例)

cd Desktop

 

2、创建 React 项目

npx create-react-app my-app

 

3、进入项目并启动

cd my-app
npm start

可以直接将项目文件拖入终端,输入 npm start 按回车启动

 

 

posted @ 2019-08-07 18:27  Leophen  阅读(224)  评论(0编辑  收藏  举报