JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="search">
JavaScript
$(function () {
var timeBeforeSend = 1000; //ms
var t = "";
$("#search").on("keydown", function () {
clearTimeout(t);
t = setTimeout(function () {
console.log("recherc"); //request here
}, timeBeforeSend);
});
});