JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button" id="myButton" > Click Me </button>

JavaScript

$("#myButton").click(function(){
        var count = 0;
         count++;
        alert("button");
         if(count>1)
             $('#myButton').prop('disabled', true);
    });