title: How to clear input after onClick with ReactJS
body: <p>I need to implement a clear/reset for the inputs after onClick occurs, and also after it is stored in localStorage. I can't seem to figure out how to code this and where. Here is my add function and render function.</p>
  
  <pre><code>addExpense(e) {
  e.preventDefault()
  let exList = this.state.exList
  if (this.state.expense === null) {
    alert('Please enter a name.')
    return false
  }
  if (this.state.amount === 0) {
    alert('Please enter a valid amount.')
    return false
  }
  if(isNaN(this.state.amount)) {
    alert('The amount must be a number.')
    return false
  }
  this.state.exList.push({ 'title':this.state.title, 'amount':this.state.amount })
  this.setState({ exList: this.state.exList })
  localStorage.setItem('exList', JSON.stringify(exList))
  }
  
  render() {
  let myExpenses = this.state.exList.map((val, key) =&gt; { return &lt;ExpenseList val={val} key={key} id={key} delMe={() =&gt;this.removeExpense(key) } /&gt;
  })
  return (
    &lt;main className="ContactList"&gt;
      &lt;section className="add container"&gt;
        &lt;h2 className="newExpense"&gt;Add Expense&lt;/h2&gt;
        &lt;form name="myForm"&gt;
          &lt;p&gt;
            &lt;label&gt;Title &lt;/label&gt;
            &lt;input type="text" name="title" onChange= . 
     {this.changeExpense} /&gt;
            &lt;label&gt;Amount &lt;/label&gt;
            &lt;input type="text" name="amount" onChange= . 
     {this.changeAmount} /&gt;
            &lt;button type="submit" className="btn" onClick= . 
     {this.addExpense}&gt;Add&lt;/button&gt;
          &lt;/p&gt;
        &lt;/form&gt;
      &lt;/section&gt;
  
      &lt;section className="container"&gt;
        &lt;h3 className="currentExpense"&gt;Current Expenses&lt;/h3&gt;
        &lt;article className="contentScroll"&gt;
          &lt;ul className="expenseCont"&gt;{myExpenses}&lt;/ul&gt;
        &lt;/article&gt;
      &lt;/section&gt;
    &lt;/main&gt;
  )
  }
  </code></pre>