JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" class="alternar-texto">
Ver texto 1</a>
<div class="texto">Texto 1...</div>
<a href="#" class="alternar-texto">
Ver texto 2</a>
<div class="texto">Texto 2...</div>
JavaScript
$(".alternar-texto").on("click", function(){
$(this).next().toggle();
});