JSFiddle - React, Tailwind, and code Playground
HTML
<form id="some-form" action="/test">
<input type="text"><br/>
<button type="button" onclick='submitForm()'>
Submit
</button>
</form>
JavaScript
var submitForm = function(event) {
alert("Submit presset");
//async code
setTimeout(function(){
document.getElementById('some-form').submit();
}, 2000);
return false;
}