installVersionWatcher()
Home > @gooddata/sdk-ui-pluggable-host > installVersionWatcher
installVersionWatcher() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Periodically polls the COMMITHASH file and fires onNewDeployment once when the deployed commit differs from the one the tab was loaded with. Stops polling after the first detection — the caller decides what to do (typically: show a "please reload" banner).
Idempotent: calling more than once is a no-op after the first invocation.
Signature:
export declare function installVersionWatcher({ url, intervalMs, onNewDeployment }: IVersionWatcherOptions): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
{ url, intervalMs, onNewDeployment } |
Returns:
void