content: import React from 'react'
  import { connect } from 'react-redux'
  import { NAME } from '../constants'
  import * as actions from '../actions'
  
  
  class Main extends React.Component {
  
    render() {
      return (
        <div>
          <h3>Welcome to Section B</h3>
          <button onClick={this.props.handleMainClick}>Click me!</button>
          <p style={{display: 'inline', marginLeft: '5px'}}>
            Clicks: {this.props.data.clickCount}
          </p>
        </div>
      )
    }
  
  }
  
  function mapStateToProps(state) {
    return {
      data: state[NAME]
    }
  }
  
  function mapDispatchToProps(dispatch) {
    return {
      handleMainClick: () => {
        dispatch(actions.mainClick())
      }
    }
  }
  
  export default connect(mapStateToProps, mapDispatchToProps)(Main)