Home > @plasmicapp/query > addLoadingStateListener
addLoadingStateListener() function
Subscribes to whether any loading is happening via @plasmicapp/query. Returns a function to unsubscribe.
Signature:
export declare function addLoadingStateListener(listener: LoadingStateListener, opts?: {
immediate?: boolean;
}): () => void;
Parameters
Parameter | Type | Description |
---|---|---|
listener | LoadingStateListener | |
opts | { immediate?: boolean; } | (Optional) |
Returns:
() => void