JSFiddle - React, Tailwind, and code Playground
HTML
<button onclick="doThat()">
Click
</button>
JavaScript
function doThat() {
console.log("click happened");
}
<button onclick="doThat()">
Click
</button>
function doThat() {
console.log("click happened");
}