异步组件与withRouter路由方法
1.将组件进行异步加载用到react-loadable
第三方库
https://github.com/jamiebuilds/react-loadable
2.在组件中从react-router-dom引入{withRouter}
方法,使得组件可以正确获取路由间的传参
1.将组件进行异步加载用到react-loadable
第三方库
https://github.com/jamiebuilds/react-loadable
2.在组件中从react-router-dom引入{withRouter}
方法,使得组件可以正确获取路由间的传参