title: Render a new row onPress() of button React Native
body: <p>I want to add functionality eg: 'Add New Record'. I want whenever user clicked on 'Add New' button so new row should be generated below. after that I also want the data of every single row. My attached code is not working, I've also attached the error. Please provide me a solution or another trick for it. Thanks.  </p>
  
  <p>Error</p>
  
  <blockquote>
    <p>undefined is not an object (evaluating 'this.state.row.push')</p>
  </blockquote>
  
  <pre><code>    constructor(){
         super()
         this.state = {
            rows: []
         }
      }
      index = 0;
      _addRow(){
        this.state.rows.push(this.index++)
        this.setState({ rows: this.state.rows })
      }
      render(){
         let rows = this.state.rows.map((r, i) =&gt; {
          return &lt;View key={ i } style={[styles.row, CheckIndex(i)]}&gt;
                    &lt;Text &gt;Row { r }, Index { i }&lt;/Text&gt;
                 &lt;/View&gt;
         })
          return (
            &lt;View style={styles.container}&gt;
              &lt;TouchableHighlight onPress={ this._addRow } style={styles.button}&gt;
                  &lt;Text&gt;Add new row&lt;/Text&gt;
                      &lt;/TouchableHighlight&gt;
              { rows }
            &lt;/View&gt;
          );
      }
  </code></pre>