JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div>
<p id="txt">You clicked 0 times.</p>
<button id="btn">Click me</button>
</div>
</body>
</html>
JavaScript
var $txt = $('#txt');
var $btn = $('#btn');
var ctr = 0;
$btn.click(() => {
ctr++;
$txt.text(`You clicked ${ctr} times.`)
});