JSFiddle - React, Tailwind, and code Playground

HTML

<div onclick="var element = document.getElementById('selector'); if (element.value == 'something') { alert('hello'); } else { alert('goodbye'); } ">
    Click here 
    <input type="hidden" id="selector" value="something" />
</div>