First of all, UMiJS highly encapsulates the routing, making the routing more flexible and hardly needs much attention in development. Dva encapsulates the data flow scheme of REdux and Redux-Saga!

1. Global layout

Index.js in the layouts file

2. Predefined routes and user-defined routes

1. Set up the corresponding file in the Pages folder to generate the corresponding routeUmijs.org/zh/guide/ro…

2. Custom route Configure a route in routes in umirc.js. You can also create a router.js file in Pages to configure the route

3. Understanding of the models in the dva this here in the about of the pages for the column, specific still should see dva website https://dvajs.com/guide/introduce-class.html#app-model

There are a number of ways in which components can connect to Modles, but I’ll just enumerate two relatively simple ones

1. Be careful how you use decorators !!!!

@connect() do not export default class XXX directly, otherwise error will be reported, use class XXX and then export default XXXX finally

@connect(({ aboutpage, loading }) => ({
  aboutpage,
  loading: loading.effects['aboutpage/getData'], 
}))

2.

export default connect(({ aboutpage, loading }) => ({aboutpage,loading: loading.effects['aboutpage/getData'],}))(About);

!!!!!!!!! Write an article for the first time, in awe! Also hope god not stingy give advice, a lot of help, there are problems welcome correction!