Function useDebounce

  • Hook which ensures that a value is not updated too frequently. Hook will only update the debounced return value when the hook has not been called for the specified time. Hook will set a timeout for when the value should be updated, the timeout will be canceled if the input value changes and the return value will not be updated if the timeout is canceled before the delay is passed

    Parameters

    • value: string

      the value that is likely to be updated frequently

    • delay: number

      how long the hook should wait for a new call before it will updated the debounced value

    Returns string

    {string} the debounced value

    Export

Generated using TypeDoc