cockpit-plugin-base-react - v1.1.1
    Preparing search index...

    Function useAutoRefresh

    • Calls fn on a repeating interval, pausing automatically when the browser tab is hidden.

      Parameters

      • fn: () => void | Promise<void>

        The callback to invoke on each tick. May be async — rejections are swallowed.

      • intervalMs: number

        Interval duration in milliseconds.

      • paused: boolean = false

        When true, suspends polling without tearing down the effect.

      Returns void