JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="t" />
<input type="button" onclick="alert(document.getElementById('t').value)" value="Click me!"/>