useDebouncedValue

    API

    import useDebouncedValue from '@restart/hooks/useDebouncedValue'
    • useDebouncedValue<TValue>(value: TValue, delayMs: number) => TValue

      Debounce a value change by a specified number of milliseconds. Useful when you want need to trigger a change based on a value change, but want to defer changes until the changes reach some level of infrequency.

      Parameters

      • valueTValue
      • delayMsnumber

      Return Value TValue