JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" placeholder="Enter your name...">
<button>Submit</button>
JavaScript
$(document).ready(function() {
$('button').prop('disabled', true);
$('input[type=text]').on('input', function() {
$('button').prop('disabled', !$(this).val());
});
});