JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" />
<button type="button" disabled>
BUTTON
</button>
JavaScript
$(document).ready(function() {
$("input").keyup(function() {
if (!$(this).val()) {
$("button").prop("disabled", true);
} else {
$("button").prop("disabled", false);
}
});
})