JSFiddle - React, Tailwind, and code Playground
HTML
<span id="btn"><button id="btnEvt">Afficher</button></span>
<div id="cache">
dsqdqsdqsdqsd sqdqdsqd
</div>
CSS
#cache {
display: none;
}
JavaScript
$("#btnEvt").on("click", function() {
$(this).text(function(i, text) {
return text === "Cacher" ? "Afficher" : "Cacher";
});
$('#cache').toggle();
});