JSFiddle - React, Tailwind, and code Playground

HTML

<div id="fade" style="background-color:#66FFFF;width:500px;
height:100px;text-align:center;display:none" >
  This text should fade in and out
</div>

JavaScript

setInterval(function(){$("#fade").fadeIn();}, 1500);