August 2017
Beginner
374 pages
10h 41m
English
Similarly to the Router component, we are going to connect the Navigation component to Redux by passing the route sub-state as a property to it. Additionally, we use mapDispatchToProps to pass the navigate action creator to the Navigation component. Perform the following steps to connect the Navigation component to Redux:
import { connect } from 'react-redux'import { bindActionCreators } from 'redux'import Navigation from '../components/Navigation.jsx'import { navigate } from '../actions'
Read now
Unlock full access