1.将组件进行异步加载用到react-loadable
第三方库
https://github.com/jamiebuilds/react-loadable
2.在组件中从react-router-dom引入{withRouter}
方法,使得组件可以正确获取路由间的传参
异步组件与withRouter路由方法
猜你喜欢
转载自blog.csdn.net/weixin_39786582/article/details/83747127
今日推荐
周排行