Function useNotifiedPollingIf
- useNotifiedPollingIf<T>(predicate: (() => boolean | PromiseLike<boolean>), asyncFunction: (() => T | PromiseLike<T>), intervalMs?: number, immediate?: boolean): SubscriptionManager<T>
-
Parameters
-
predicate: (() => boolean | PromiseLike<boolean>)
-
- (): boolean | PromiseLike<boolean>
-
Returns boolean | PromiseLike<boolean>
-
asyncFunction: (() => T | PromiseLike<T>)
-
- (): T | PromiseLike<T>
-
Returns T | PromiseLike<T>
-
intervalMs: number = 60000
-
immediate: boolean = true
This is a conditional polling hook that allows a subscription that gets called when the poll completes.