JSFiddle - React, Tailwind, and code Playground
HTML
<form action="/test" onsubmit="submitForm(event)">
<input type="checkbox" name="test" onchange="this.form.submit()"/>
<button type="submit">submit</button>
</form>
<script type="text/javascript">
function submitForm(event){
console.log(event);
event.preventDefault();
}
</script>