JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
<input type="submit" value="submit" disabled>
JavaScript
$(function () {
$(":text").on('keyup input change', check_submit).each(check_submit);
});
function check_submit() {
var $this = $(this);
$(":submit").prop("disabled", function () {
return !$this.val().length;
});
}