JSFiddle - React, Tailwind, and code Playground

HTML

<input id='input'>
    <div id='output'></div>

JavaScript

var input = document.getElementById("input").oninput = inputChange;

function inputChange() {
    if ( event.target.value.length )
       document.getElementById("output").innerText = "input have text"
    else 
        document.getElementById("output").innerText = "input not have text"           
}