DEV Community

Zhangwuji
Zhangwuji

Posted on

umi3 study

  1. use pnpm to create one umi simple template; if you want to use ant-mobile; just npm i ant-mobile; just save;
  2. .some umi3 don't auto load umi-plugins in dependency on your peoject。 you can pnpm add -D @umijs/plugins then you must manually start them; for example
plugins: ['@umijs/plugins/dist/antd'],
  antd: {}

Enter fullscreen mode Exit fullscreen mode

Image description
but if you use ant; don't have comfortable .d.ts for it;you should install .d.ts of ant-design;

4.dont forget if you add code plugins: ['@umijs/plugins/dist/antd'] but these don't indicate plugin start; you must write these configuration item
eg. `model: {

}; they will load and start @umijs/plugins/dist/antd`

  1. useEffect is from react import { useState, useCallback, useEffect } from 'react';

Top comments (0)