title: How to export mapStateToProps and Redux Form?
body: <p>I'm using Redux Form (ver. 6) for a log in page. What I would like to do is when the user fills out the form and clicks submit, grab the text from my state so that I can eventually dispatch an action with that email and password. However, I'm having trouble with exporting this component while using both connect from react-redux and Redux Form. </p>
  
  <p>Using react-redux, connect wants to be exported like so when mapping state to props:</p>
  
  <p>export default connect(mapStateToProps)(LogInForm)</p>
  
  <p>However, Redux Form wants it's export set up like this:</p>
  
  <pre><code>export default reduxForm({
    form: 'LogInForm',
    validate,
  })(LogInForm);
  </code></pre>
  
  <p>Is there a way to combine these two? I'd tried something like:</p>
  
  <pre><code>const reduxFormConfig = reduxForm({
    form: 'LogInForm',
    validate,
  });
  
  export default connect(mapStateToProps)(ReduxFormConfig)(LogInForm)
  </code></pre>
  
  <p>but it did not work. </p>
  
  <p>Or Perhaps that's a better approach to handling this? Here is the full code from within my component:</p>
  
  <pre><code>import React from 'react';
  import { connect } from 'react-redux';
  import { Field, reduxForm } from 'redux-form';
  import InputField from '../InputField';
  import { validateLogInSignUp as validate } from '../../utils/validateForms.js';
  
  const LogInForm = (props) =&gt; {
    const {
      handleSubmit,
      pristine,
      submitting,
    } = props;
  
    return (
      &lt;div&gt;
        &lt;form onSubmit={handleSubmit}&gt;
          &lt;Field
            name="email"
            type="email"
            component={InputField}
            label="email"
          /&gt;
          &lt;Field
            name="password"
            type="password"
            component={InputField}
            label="password"
          /&gt;
          &lt;div&gt;
            &lt;button type="submit" disabled={submitting}&gt;Submit&lt;/button&gt;
          &lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    );
  };
  
  const mapStateToProps = state =&gt; {
    return {
      loginInput: state.form,
    };
  };
  
  // export default connect(mapStateToProps)(LogInForm)
  
  // export default reduxForm({
  //  form: 'LogInForm',
  //  validate,
  // })(LogInForm);
  </code></pre>
  
  <p>Any and all help is much appreciated. Thanks!</p>