UNPKG

@ledgerhq/live-common

Version:
12 lines 639 B
/** * Returns a stabilized version of a "pending" boolean that delays the transition * from true to false. Use when the raw pending flag toggles rapidly (e.g. during * a single poll) and you want to avoid UI flicker. * * - When pending becomes true → returns true immediately. * - When pending becomes false → returns false only after it has stayed false * for `delayMs` (default 200ms). If pending goes true again before that, the * delay is cancelled and the return value stays true. */ export declare function useStablePending(pending: boolean, delayMs?: number): boolean; //# sourceMappingURL=useStablePending.d.ts.map