본문으로 건너뛰기

인터페이스: PreactThrottlerOptions<TFn, TSelected>

정의 위치: preact-pacer/src/throttler/useThrottler.ts:13

확장

  • ThrottlerOptions<TFn>

타입 매개변수

TFn

TFn extends AnyFunction

TSelected

TSelected = { }

속성

onUnmount()?

optional onUnmount: (throttler) => void;

정의 위치: preact-pacer/src/throttler/useThrottler.ts:21

컴포넌트가 언마운트될 때 호출되는 선택적 콜백입니다. 스로틀러 인스턴스를 받습니다. 제공하면 기본 정리 동작(cancel)을 대체합니다. flush(), reset(), cancel() 호출, 로깅 추가 등에 사용합니다.

매개변수

throttler

PreactThrottler<TFn, TSelected>

반환값

void