5.0.0
## Test Case
-
import { withRouter, Link } from 'react-router-dom';componentDidMount() {this.unlisten = this.props.history.listen(() => console.log('route changed')); }componentWillUnmount() {this.unlisten();}this.props.history.push('url'); _in my case this line executed after ajax req_export default connect(mapStateToProps, mapDispatchToProps)(withRouter(MyCom));console.log('route changed') should run after step 4. but it doesn't.
history.listen doesn't fire.
BTW when if route changes via <Link>, everything is fine.
Please don't recreate issues.
@timdorr please don't close the issue without any explanation then! if this is not a bug, what is this?
@dehghani-mehdi This is an issue related to ReactTraining/history not to React Router.
Just for reference, for more info about this issue, see: https://github.com/ReactTraining/history/issues/710
Most helpful comment
@timdorr please don't close the issue without any explanation then! if this is not a bug, what is this?