JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<p> Count: {count}</p>
<button onclick={increaseCount}>Increase Counter</button>
</div>
JavaScript
let count = 0
const increaseCount = () => {
count += 1;
console.log(count);
}