This is the value that i want to clear and create it in state 1st STEP
state={
TemplateCode:"",
}
craete submitHandler function for Button or what you want 3rd STEP
submitHandler=()=>{
this.clear();//this is function i made
}
This is clear function Final STEP
clear = () =>{
this.setState({
TemplateCode: ""//simply you can clear Templatecode
});
}
when click button Templatecode is clear 2nd STEP
<div class="col-md-12" align="right">
<button id="" type="submit" class="btn btnprimary" onClick{this.submitHandler}> Save
</button>
</div>