JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="box" name="box" value="" checked>
<input type="text" id="comment" name="comment" value="" />
JavaScript
$(document).ready(function() {
$("#comment").on("keyup blur", function() {
$("#box").prop("checked", this.value == "");
});
});