Skip to content

RihuaChen/umi-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2c1156d · Jul 29, 2022

History

7 Commits
Mar 23, 2021
Mar 26, 2021
Mar 26, 2021
Mar 23, 2021
Mar 23, 2021
Mar 23, 2021
Mar 23, 2021
Mar 23, 2021
Mar 23, 2021
Mar 23, 2021
Jul 29, 2022
Mar 28, 2021
Mar 26, 2021
Mar 23, 2021
Mar 23, 2021
Mar 26, 2021

Repository files navigation

umi project

Getting Started

Install dependencies,

$ yarn

Start the dev server,

$ yarn start

Development

Mock Data

umi has provided mock function, we can use it refer to https://umijs.org/zh-CN/docs/mock

Request Method

We provided two methods to initiate a http request

  • use src/utils/request This method we use umi-request and add some interceptors to suite our json data and handle errors.

  • use ahook's useRequest hook ahook is a library from alibaba, you can find more details from https://ahooks.js.org/zh-CN/hooks/async

demo

We provided two demo pages to show how to interact with backend. You can visit /hooks-page to find development method without dva.

You also can visit /model-page to find development method with dva.