title: Generating text box for each values in array using reactjs
body: <p>Hi Im trying my hands on reactjs, I have an array and to the array Im trying to generate textbox for each element. So that each element is renamed and saved to the new array, which is used for other purpose. The issue I face here is Im able to generate the text boxes for each element but Im not able edit it. So Im looking for help.</p>
  
  <pre><code>class setNewname extends Component {
  
      constructor(props) {
          super(props);
  
          this.state = {
              oldArr: [apple,orange,grape],
              tabName: [],
          };
          this.onNameEdited = this.onNameEdited.bind(this);
      }
  
      onNameEdited(event) {
          this.state.tabVal = event.target.value;
          var tabName= this.state.tabName.concat(this.state.tabVal);
          debugger;
      };
  
      render() {
          return (
              &lt;div&gt;
                  {this.state.tName.map(x =&gt;
                     {x} 
  
                      &lt;input type="text" label={x} key={x.toString()}
                          onChange={this.onNameEdited} /&gt;)}
              &lt;/div&gt;
  
          );
      }
  }
  
  function bindAppStateToProps(applicationState) {
      debugger;
      return {
          tableName: applicationState.TableName.saveTable,
      };
  }
  
  
  export default connect(bindAppStateToProps)(setNewname);
  </code></pre>