title: React js dynamic input field value to state
body: <p>How to pass dynamic input field value to state as an array and update the value when user changes the input again?</p>
  
  <p>Input field was generated by JSON data and in the state, we cannot define the initial value for all. Can anyone give some advice for this kind of problem?</p>
  
  <pre><code>this.state = { 
  file:[{value1,value2}]
  }; 
  </code></pre>
  
  <p>and input field is generated like</p>
  
  <pre><code>{this.state.language.map((item,index) =&gt;
  &lt;div className="be-checkbox inline" key={index} &gt;
   &lt;input type="text"  onChange={this.handleChange.bind(this, index)} value={this.state.index} /&gt;
  &lt;/div&gt;
  )}
  </code></pre>