I have a form containing various input fields and two buttons; one for submitting and one for cancelling.
Following code should reset the form in one click.
import React, { Component } from 'react'; class App extends Component { constructor(props){ super(props); this.handleSubmit=this.handleSubmit.bind(this); } handleSubmit(e){ this.refs.form.reset(); } render(){ return( submit } }