react v15.5.4
redux v3.6.0
react-redux v5.0.4
react-router v4.1.1
react-router-redux v5.0.0-alpha.6
Live examples (hash history):
http://mars.iti.pk.edu.pl/~nkg/container/dist/ - routes wrapped by container component and working wrong
http://mars.iti.pk.edu.pl/~nkg/presentation/dist/ - routes wrapped by presentation component and working good
Source code (browser history):
https://github.com/dzwiedziu-nkg/react-router-redux-bug
Go to http://mars.iti.pk.edu.pl/~nkg/container/dist/ and:
/about and see _About_ below hyperlinks./topics and see _Topics_ below hyperlinks./about and see _About_ below hyperlinks./ and see _Home_ below hyperlinks./about and see _About_ below hyperlinks - good./topics and see _Topics_ below hyperlinks - good./about and see _Topics_ below hyperlinks - wrong./ and see _About_ below hyperlinks - wrong.My mistake, I forgot to use withRouter (https://reacttraining.com/react-router/web/guides/redux-integration). When changed const LayoutContainer = connect(mapStateToProps)(Layout); to const LayoutContainer = withRouter(connect(mapStateToProps)(Layout)); it works well.
Most helpful comment
My mistake, I forgot to use
withRouter(https://reacttraining.com/react-router/web/guides/redux-integration). When changedconst LayoutContainer = connect(mapStateToProps)(Layout);toconst LayoutContainer = withRouter(connect(mapStateToProps)(Layout));it works well.