Skip to Content
🎉 Coral x Panda has been released 🎉 Read the Migration Guide

debounce

A helper function that creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.

Import

import { debounce } from '@krakentech/utils';

Usage

const fn = () => console.log('debounced'); const debouncedFn = debounce(fn, 1000);

Args

NameDescriptionTypeDefaultRequired
functionThe function to debounce.Functiontrue
waitingTimeInMsThe number of milliseconds to delay.number150true
Last updated on