JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="Some Value" id="text1" />
<button id="btn1">Click Me</button>

JavaScript

$('#text1').bind("propertychange change click keyup input paste", function(event){
     if ($(this).val().length == 0 ) {
         $("#btn1").hide();
     } else {
         $("#btn1").show();
     }
 });