umi+dva+antd新建项目

首先全局安装dva+umi
umi:npm install -g umi
dva:npm install -g dva-cli
 

通过脚手架创建项目

一:
mkdir myapp && cd myapp

二:
npm create umi

三:
? Select the boilerplate type (Use arrow keys)
  ant-design-pro  - Create project with an layout-only ant-design-pro boilerplate, use together with umi block.
❯ app             - Create project with a simple boilerplate, support typescript.
  block           - Create a umi block.
  library         - Create a library with umi.
  plugin          - Create a umi plugin.

四:
? Do you want to use typescript? (y/N)

五:
? What functionality do you want to enable? (Press  to select,  to toggle all,  to invert selection)
❯◯ antd
 ◯ dva
 ◯ code splitting
 ◯ dll

地五步的时候选择antd和dva即可 

项目搭建和使用请看这篇文章:dva umi antd项目从搭建到使用

 

参考umi官网文档(https://umijs.org/zh/guide/create-umi-app.html#%E4%BB%8B%E7%BB%8D-create-umi)

具体用法可以查看官方文档

 

你可能感兴趣的:(React)