title: Pass dispatch function to child component
body: <p>I'm developing a universal react application using redux. in my action creators I dispatch my data to store.</p>
  
  <p>in ComponentDidMount function dispatch function is Ok but when I want pass it to component in render function It gives me error that <strong>Cannot read property 'dispatch' of undefined</strong>
  How I can pass my dispatch functions to component?</p>
  
  <p>Container Code :</p>
  
  <pre><code>class DealContainer extends React.Component {
  static readyOnActions(dispatch, params) {
                  return Promise.all([
                      dispatch(DealsActions.fetchDealData(params.id)),
                      dispatch(SubmitActions.fetchSubmitInitialData()),
  
                  ]);
              }
  
              componentDidMount() {
                  DealContainer.readyOnActions(this.props.dispatch,this.props.params);
  
              }
      render() {
      return(
      &lt;MyComponent 
      changeStoreFunction = {this.props.dispatch(SubmitActions.changeUserId)}
      /&gt;)
  
      }
      const mapStateToProps = (state, ownProps) =&gt; {
          return {
              dealData: state.dealData,
              routing: ownProps.location.query,
              submitInitialData: state.submitInitialData,
              id: ownProps.params.id,
              mapInfo: state.mapInfo,
              areaList: state.areaList,
          }
      };
  
      DealContainer.propTypes = {
          params: PropTypes.shape({
              id: PropTypes.string.isRequired,
          }).isRequired,
          dispatch: PropTypes.func.isRequired,
      };
          }
      export default connect(mapStateToProps)(DealContainer);
  </code></pre>