JSFiddle - React, Tailwind, and code Playground
HTML
<script>
function checkForm(f) {
if (f.checked) f.checkbox.disabled = 0
else f.checkbox.disabled = 1
}
</script>
<form>
<input type="text" onchange="checkForm(this.form)">
<input type="checkbox" name="checkbox">
</form>