import React, { Component } from 'react' import { connect } from 'react-redux' class CounterDisplay extends Component { render () { return (

Counter

This counter is connected via the connect function. Components which are not pages can be connected using the connect function just like redux components.

Current value {this.props.counter}

) } } const mapState = state => ({ counter: state.counter }) const mapDispatch = ({ counter: { increment, incrementAsync } }) => ({ incrementBy3: () => increment(3) }) export default connect(mapState, mapDispatch)(CounterDisplay)