-
-
Save theStrangeAdventurer/9e45852a9459bef62c6923fd925f6346 to your computer and use it in GitHub Desktop.
REACT REDUX: snippet mapStateToProps changePage connected-react-router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { push } from 'connected-react-router'; | |
import { bindActionCreators } from 'redux'; | |
const mapDispatchToProps = dispatch => | |
bindActionCreators( | |
{ | |
changePage: () => push('/url-to-another-page') | |
}, | |
dispatch | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment