JSFiddle - React, Tailwind, and code Playground

HTML

<p class="first">Connected</p>

CSS

.first {
   color:red;   
}
.second{
   color:blue;   
}

JavaScript

setInterval(function() {
    $('p').fadeOut(500, function() {
        var $this = $(this);
        $this.text(
         $this.text()  == "Connected" && ("True")
        ); 

        $this.fadeIn(500);
    });
}, 500);