JSFiddle - React, Tailwind, and code Playground

HTML

<input />

JavaScript

$('input').on('keyup', function() {
    clearTimeout( $(this).data('throttle') );
    
    $(this).data('throttle', setTimeout(function() {
        console.log('do stuff');
    }, 1000));
    
});