JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<p>Should I hide this message?</p>
<button>Click for hide</button>
</div>
JavaScript
$('button').click(function () {
$(this).text($(this).text() == "Click for hide" ? "Click for unhide" : "Click for hide");
$('p').slideToggle();
});