JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" class="btn" value="a"/>

JavaScript

document.querySelector('.btn').onclick = function(event) {
  console.log(event.currentTarget.value);
}