title: How to clear data in textbox in reactjs
body: <p>how to clear data in textbox in reactjs? After submit of the form I want to clear all the data as well as on click of cancel button. Can anyone help please ?</p>
  
  <pre><code>//Create Form
    onSubmit(e){
      e.preventDefault();
        if(this.handleValidation()){
        alert("Form submit");
       }
    }
  
    //Cancel Form
    onCancel(e){
      e.preventDefault();
      alert("Cancel");
    //  e.target.reset();
  }
  
  
  &lt;button type="submit" className="btn btn-success active" onClick={this.onSubmit}&gt;&lt;b&gt;Create&lt;/b&gt;&lt;/button&gt;
  &lt;button type="button" className="btn btn-warning"&gt;&lt;b&gt;Preview&lt;/b&gt;&lt;/button&gt;
  &lt;button type="button" className="btn btn-danger" onClick={this.onCancel}&gt;&lt;b&gt;Cancel&lt;/b&gt;&lt;/button&gt;
  </code></pre>