JSFiddle - React, Tailwind, and code Playground

HTML

<form id="myform">
  <input type="text" />
  <input type="text" />
</form>

<button>
Clear
</button>

JavaScript

$('button').click(function(){
	$("#myform input").each(function() {
    $(this).val('');
  });
});