@leafygreen-ui/hooks
Version:
LeafyGreen UI Kit Custom Hooks
21 lines • 561 B
TypeScript
type OnPoll = () => void;
interface PollerOptions {
/**
* How frequently should we call the onPoll handler. Defaults to 30 seconds.
* @default 30000
*/
interval?: number;
/**
* Should we immediately trigger the onPoll handler.
* @default true
*/
immediate?: boolean;
/**
* Should we be polling.
* @default true
*/
enabled?: boolean;
}
export default function usePoller(onPoll: OnPoll, { interval, immediate, enabled }?: PollerOptions): void;
export {};
//# sourceMappingURL=usePoller.d.ts.map