title: 'dispatch' is not a function when argument to mapToDispatchToProps() in Redux
body: <p>I am a javascript/redux/react beginner building an small application with redux, react-redux, &amp; react. For some reason when using mapDispatchToProps function in tandem with connect (react-redux binding) I receive a TypeError indicating that dispatch is not a function when I try to execute the resulting prop. When I call dispatch as a prop however (see the setAddr function in the provided code) it works. </p>
  
  <p>I'm curious as to why this is, in the example TODO app in the redux docs the mapDispatchToProps method is setup the same way. When I console.log(dispatch) inside the function it says dispatch is type object. I could continue to use dispatch this way but I would feel better knowing why this is happening before I continue any further with redux. I am using webpack with babel-loaders to compile.</p>
  
  <p>My Code:</p>
  
  <pre><code>import React, { PropTypes, Component } from 'react';
  import { connect } from 'react-redux';
  import { setAddresses } from '../actions.js';
  import GeoCode from './geoCode.js';
  import FlatButton from 'material-ui/lib/flat-button';
  
  const Start = React.createClass({
      propTypes: {
          onSubmit: PropTypes.func.isRequired
      },
  
      setAddr: function(){
          this.props.dispatch(
              setAddresses({
                  pickup: this.refs.pickup.state.address,
                  dropoff: this.refs.dropoff.state.address
              })
          )   
  
      },
  
      render: function() {
          return (
              &lt;div&gt;
                  &lt;div className="row"&gt;
                      &lt;div className="col-xs-6"&gt;
                          &lt;GeoCode ref='pickup' /&gt;
                      &lt;/div&gt;
                      &lt;div className="col-xs-6"&gt;
                          &lt;GeoCode ref='dropoff' /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div className="row"&gt;
                      &lt;div className="col-xs-6"&gt;
                          &lt;FlatButton 
                              label='Does Not Work'
                              onClick={this.props.onSubmit({
                                  pickup: this.refs.pickup.state.address,
                                  dropoff: this.refs.dropoff.state.address
                              })} 
                              /&gt;
                      &lt;/div&gt;
                      &lt;div className="col-xs-6"&gt;
                          &lt;FlatButton 
                              label='Works'
                              onClick={this.setAddr} 
                              /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          );
      }
  })
  
  const mapDispatchToProps = (dispatch) =&gt; {
      return {
          onSubmit: (data) =&gt; {
              dispatch(setAddresses(data))
          }
      }
  }
  
  const StartContainer = connect(mapDispatchToProps)(Start)
  
  export default StartContainer
  </code></pre>
  
  <p>Cheers.</p>