前端遇到的坑 Posted on 2018-09-28 | In 前端 | Words count in article: 46 Router 对于某个组件,如果同时需要使用connect方法以及withRouter方法,需要将withRouter包裹在connect方法外层,否则withRouter无效. eg:export default withRouter(connect(mapStateToProps, mapDispatchToProps(Component))