title: Accessing this.context from onSubmitSuccess of redux-form
body: <p>Here is the problem I am facing: </p>
  
  <p>I am using react-router and redux-form in my application. In one of my forms, I want to use the router to go back to the main page after the submission succeeds. Here is the code I have: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function Router(target) {
    target.contextTypes = target.contextTypes || {};
    target.contextTypes.router = React.PropTypes.func.isRequired;
  }
  
  enter code here
  @Router
  @reduxForm({
      form: 'editLocation',
      fields: LocationFormFields,
      validate: ValidateLocationForm,
      onSubmitSuccess: () =&gt; {
          var path = '/locations';
          this.context.router.push(path);
      },
      onSubmitFail: () =&gt; {
          console.log('failed');
      }
  }, MapStateToProps)
  export class EditLocation extends React.Component .....</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that 'this.context' is not defined inside the onSubmitSucess method. </p>
  
  <p>I know that I can take care of this using browserHistory directly. However, I don't want to really go that route and I want to use this.cotext. Any ideas? </p>