import { connect } from 'react-redux' ; import { Dispatch } from 'redux' ; import { decrement , increment } from '../actions' ; import Counter from '../components/Counter' ; import { StoreState } from '../types' ; const mapStateToProps = ( state ) : { value : number ; } => ( { value : state } ) ; const mapDispatchToProps = ( dispatch ) => ( { onDecrement : ( ) => dispatch ( decrement ( ) ) , onIncrement : ( ) => dispatch ( increment ( ) ) } ) ; export default connect ( mapStateToProps , mapDispatchToProps ) ( Counter ) ;