JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input type='text'>
<button type='submit'>Submit</button>
</form>
JavaScript
$('form').on('submit', function(e) {
alert('submit');
e.preventDefault();
});
$('button').on('click', function(e) {
e.stopPropagation();
alert('clicked');
});