August 2017
Beginner
374 pages
10h 41m
English
Because our router is now connected to Redux, we can dispatch an action to navigate to another page/route.
To do this, simply import the push action creator from the library:
import { push } from 'react-router-redux'
You can dispatch this action like any other, using store.dispatch:
store.dispatch(push('/about'))
Or pass it to a connected component via mapDispatchToProps:
const mapDispatchToProps = (dispatch, props) => bindActionCreators({ push }, dispatch)
Read now
Unlock full access