JSFiddle - React, Tailwind, and code Playground
by ocanal
HTML
<input type="text" id="tbCodigo" />
JavaScript
$("#tbCodigo").change(function() {
if ($(this).val() != "") {
alert(0);
} else {
alert(1);
}
});