JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="suggestion" onkeyup="callMe(200);"/>
<script>
var to;
function callMe(ms) {
clearTimeout(to);
to = setTimeout(function(){
alert("I've been called after timeout");
}, ms);
}
</script>