JSFiddle - React, Tailwind, and code Playground
HTML
<button>ClickMe</button>
JavaScript
(function(){
$('button').on('click',function(){
var $this=$(this);
$this
.attr('disabled','disabled');
setTimeout(function() {
$this.removeAttr('disabled');
}, 3000);
});
})();