JSFiddle - React, Tailwind, and code Playground

HTML

<p>0</p>

JavaScript

$(function(){ // you can wrap it here with in document ready block
   $("p").click(function(){
       $(this).html(+this.textContent + 1);
   });
});