How do you pass in a dynamic form name in redux form? : <p>Im trying to use this code to pass a dynamic form name into reduxForm.</p>

<p>Here is the code that I found:</p>

<pre><code>let FormAddress = compose(connect((state, props) =&gt; ({form: props.form})), reduxForm({destroyOnUnmount: false, asyncBlurFields: []}))(ValidationForm);
</code></pre>

<p>From this article:
<a href="https://github.com/erikras/redux-form/issues/603#issuecomment-254271319" rel="noreferrer">https://github.com/erikras/redux-form/issues/603#issuecomment-254271319</a></p>

<p>But I'm not really sure whats going on.</p>

<p>This is how I'm currently doing it:</p>

<pre><code>const formName = 'shippingAddress';
const form = reduxForm({
  form: formName
});

export default connect(mapStateToProps)(CityStateZip);
</code></pre>

<p>But I would like to be able to pass it in using props, like this:</p>

<pre><code>const formName = 'shippingAddress';
const form = reduxForm({
  form: props.form
  // validate
});

export default connect(mapStateToProps)(CityStateZip);
</code></pre>

<p>But when I try that, it complains that it doesnt know what props is - because I believe it's outside the scope of the function above.</p>

<p>Can someone help me?</p>
