JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button"  class="btn btn-success" id="botao-acao">Esconder/Mostrar DIV</button>  
  
  
  <div style="width:300px;height:300px;background-color:red" id="div">
       DIV QUE SOFRERÁ AÇÃO
    </div>

JavaScript

$('#botao-acao').on("click",function(){
         $("#div").toggle("slow");
      });