JSFiddle - React, Tailwind, and code Playground
by Diego Vieira
HTML
<div class="texto"></div>
JavaScript
$(function(){
var texto = 1;
var string;
setInterval(function(){
switch(texto) {
case 1: string = "Meu texto"; break;
case 2: string = "Outro Texto"; break;
case 3: string = "Mais um texto"; break;
}
$('.texto').html(string);
texto != 3 ? texto++ : texto = 1;
}, 3000);
});