JSFiddle - React, Tailwind, and code Playground

HTML

<div id="sometext">
    Start text
</div>

JavaScript

$("#sometext").fadeOut(function() {
  $(this).text("change!").fadeIn();
});