title: React Redux cannot access props from method in onClick
body: <p>I have the following for my index.js. I have set up React with create-react-app. I then installed redux and react redux.</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import AppContainer from './AppContainer';
  import {createStore} from 'redux'
  import {Provider} from 'react-redux'
  
  const defaultState = {
      activeTab: 'firstTab'
  };
  
  const reducer = function(state=defaultState, action){
      switch (action.type) {
          case 'TAB_CHANGED':
              return state.merge({
                  activeTab: state.activeTab
              })
          default: return state;
      }
  };
  const store = createStore(reducer);
  
  ReactDOM.render(
      &lt;Provider store={store}&gt;
          &lt;AppContainer /&gt;
      &lt;/Provider&gt;,
      document.getElementById('root')
  );
  </code></pre>
  
  <p>and the following for my AppContainer.js</p>
  
  <pre><code>import React from 'react';
  import PropTypes from 'prop-types';
  import {connect} from 'react-redux'
  
  class AppContainer extends React.Component {
    static propTypes = {
        activeTab: PropTypes.string.isRequired,
        dispatch: PropTypes.func.isRequired,
    }
  
    doSomething = function(){
        this.props.dispatch('TAB_CHANGED', {activeTab: Math.random().toString(36).substring(7)})
    }
  
    render() {
      return (
        &lt;div className="App"&gt;
          &lt;header className="App-header"&gt;
            &lt;h1 className="App-title"&gt;{ this.props.activeTab }&lt;/h1&gt;
          &lt;/header&gt;
          &lt;p className="App-intro"&gt;
              &lt;button onClick={this.doSomething}&gt;Do Something&lt;/button&gt;
          &lt;/p&gt;
        &lt;/div&gt;
      );
    }
  }
  
  function mapStateToProps(state){
      return state;
  }
  
  export default connect(mapStateToProps)(AppContainer);
  </code></pre>
  
  <p>The page loads fine when first rendered. The react dom can access the <code>this.props.activeTab</code>. however when I click on the <code>Do Something</code> button I get the following error: <code>TypeError: Cannot read property 'props' of undefined</code></p>