JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="txtBox" />

JavaScript

$("#txtBox").on('change', function(e){ 

    alert('txtBox has changed: ' + $(this).val());
    
});