title: Updating Table in React
body: <p>Seen a few questions but still not sure what to do. New to react as well. I want to update a table with the values of Title and Amount using input fields. I am pretty sure I have to set the state to a blank table and then update the state when it is updated. How do I update the table with a new row each time the 2 new values are added? </p>
  
  <pre><code>import React, { Component } from 'react';
  import './App.css';
  
  const table =
  &lt;table id="itemTable"&gt;
    &lt;tbody&gt;
    &lt;tr&gt;&lt;th&gt;Title&lt;/th&gt;
    &lt;th&gt;Amount&lt;/th&gt;
    &lt;th&gt;Remove Item&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;;
  
  class App extends Component {
  constructor(props){
    super(props);
    this.state = {
        title: '',
        amount: '',
        table: {table}
    };
  
      this.handleChange = this.handleChange.bind(this);
      this.handleClick = this.handleClick.bind(this);
  }
  
      handleClick() {
  //adds to table
  
      }
  
      handleChange(event) {
          this.setState({
              [event.target.name]: event.target.value
          });
      }
  
      render() {
      return (
        &lt;section className="App"&gt;
            &lt;header&gt;
                &lt;h1&gt;Money Manager&lt;/h1&gt;
            &lt;/header&gt;
  
          &lt;section&gt;
            &lt;h1&gt;Finances&lt;/h1&gt;
            &lt;form&gt;
                &lt;label htmlFor="name"&gt;Name&lt;/label&gt;
              &lt;input type="text" name="title" onChange={this.handleChange}/&gt;
  
                &lt;label htmlFor="amount"&gt;Amount&lt;/label&gt;
                &lt;input type="text" name="amount" onChange={this.handleChange}/&gt;
  
              &lt;button type="button" id="add" onClick={this.handleClick}&gt;Add item&lt;/button&gt;
            &lt;/form&gt;
  
            &lt;section&gt;
              &lt;h1&gt;Items&lt;/h1&gt;
                {table}
            &lt;/section&gt;
          &lt;/section&gt;
        &lt;/section&gt;
  
      );
    }
  }
  
  export default App
  </code></pre>