zeed
    Preparing search index...

    Function useInterval

    • Executes a function repeatedly at a specified interval and returns a disposer function that can be used to stop the execution.

      Parameters

      • fn: TimerExecFunction

        The function to be executed at the specified interval.

      • interval: number

        The interval (in milliseconds) at which the function should be executed.

      Returns DisposerFunction

      A disposer function that can be used to stop the execution of the function.