Home > @plasmicapp/query > wrapLoadingFetcher
wrapLoadingFetcher() function
Instruments an async function to increment and decrement the number of simultaneous async loads. You can then subscribe to whether there are any loads happening via addLoadingStateListener().
Signature:
export declare function wrapLoadingFetcher<T extends (...args: any[]) => Promise<any> | any>(fetcher: T): T;
Parameters
Parameter | Type | Description |
---|---|---|
fetcher | T |
Returns:
T