npm创建react项目

1:win+R 输入cmd ,打开cmd面板

2:安装cnpm 

  npm install -g cnpm --registry=https://registry.npm.taobao.org

3:安装react的构建器create-react-app

  cnpm install -g create-react-app

4:create-react-app my-test      //my-test为项目名称,可自定义

5:cd my-test

6: cnpm install --save redux //安装redux

 

7: cnpm install --save redux-saga  //saga第三方插件

8 : cnpm install axios   //axois安装(异步请求)

9 : cnpm install antd --save  //组件安装

10:cnpm install immutable   //immutable   安装

11 : cnpm install react-redux --save  

最后 : cnpm start  // 项目启动

页面显示

posted @ 2018-08-24 14:24  小欣子  阅读(4794)  评论(0编辑  收藏  举报