升级到dva2之后,记录一下遇到的问题与解决方法
升级到dva2之后,记录一下遇到的问题与解决方法 1、路由改动 import React from 'react' import PropTypes from 'prop-types' import { Router, Route, IndexRoute } from 'dva/router' import AdminApp from './routes/app' const cached = {} const registerModel = (app, model) => { if (!cached[model.namespace]) { app.model(model) cached[model.namespace] = 1 } }