JSFiddle - React, Tailwind, and code Playground
by Daedalus
HTML
<form method="post">
<input type="text" name="name" id="name" placeholder="Name" required />
<input type="submit" />
</form>
JavaScript
$("input[type='submit']").click(function(e) {
e.preventDefault();
$(this).closest('form').submit();
});