How to loop over form inputs and get values in react
<p>given the following:</p>

<pre><code>constructor () {

    super();
    this.state = {
        inputs : [
            { type: 'email', placeholder: 'Email Address' }
        ]
    };

}

render () {
  return {
    &lt;div&gt;

    {
      // Itterates over all inputs in the current state
      this.state.inputs.map((item, i) =&gt; (
        &lt;Input key={i} id={'input-' + i} ref={'input-' + i} type={item.type} placeholder={item.placeholder} /&gt;
      ))
    }

     &lt;button onClick={this.submit.bind(this)}&gt;submit&lt;/button&gt;

   &lt;/div&gt;

  };
}
</code></pre>

<p>How would i get the values once the form is submitted? e.g.</p>

<pre><code>submit () {
  // Need to loop over inputs and get values for all of them.
}
</code></pre>