<form id='myform'> ... </form> const submitForm = () => { ...some API call document.getElementById("myform").reset(); }