JSFiddle - React, Tailwind, and code Playground
HTML
<div>text</div>
JavaScript
var timeount = false;
$('div').hover(function () {
var $this = $(this);
timeount = setTimeout(function () {
$this.text("canged");
}, 500);
}, function () {
var $this = $(this);
clearTimeout(timeount);
timeount = setTimeout(function () {
$this.text("text");
}, 500);
});