Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseUpdateAvailableOptions

    Options for useUpdateAvailable.

    interface UseUpdateAvailableOptions {
        checkInterval?: number;
        currentVersion?: string;
        enabled?: boolean;
        onError?: (error: Error) => void;
        recheckOnFocus?: boolean;
        versionUrl?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    checkInterval?: number

    Polling interval in ms.

    300000 (5 minutes)
    
    currentVersion?: string

    The build hash baked into the running bundle (e.g. via Vite's define injecting an environment variable). When provided, the hook compares the polled version against this value, so a stale tab is detected on the very first poll. When omitted, falls back to anchoring on the first poll's value.

    enabled?: boolean

    Whether to enable polling. Set to false to disable.

    true
    
    onError?: (error: Error) => void

    Called on fetch / parse errors.

    recheckOnFocus?: boolean

    Whether to re-check on window focus / visibilitychange (when the tab becomes visible).

    true
    
    versionUrl?: string

    URL to poll for the server's current version.

    "/version.json"