JSFiddle - React, Tailwind, and code Playground
HTML
<form action="/test" method="post">
<input type="text" name="somefield"/>
<button id="submitbutton" type="submit">Send</button>
</form>
JavaScript
$("button").click(function(){
$(this).attr("disabled","true").html("Wait here while posted...");
});