JSFiddle - React, Tailwind, and code Playground

by alr3

HTML

<input type="hidden" name="state" id="state" value="123" />

JavaScript

if ($('#state').val() == '') {
    alert('null') // input is full but return null
}
else {
    alert('not null') // runing else 
}