• This is a variant of set state that debounces rapid changes to a state. This performs a shallow state check, use useDebouncedDeepState for a deep comparison. Internally this uses lodash debounce to perform the debounce operation.

    Returns

    state and setter

    Type Parameters

    • S

    Parameters

    • initialValue: S

      initial value

    • waitMillis: number

      The number of milliseconds to delay.

    • Optional debounceSettings: DebounceSettings

      debounce settings.

    Returns [S, Dispatch<S>]

Generated using TypeDoc