Hex Core JS
    Preparing search index...

    Function useTimeout

    • Creates a setTimeout function that works like window.setTimeout, but subsequent calls clear the previous if still incomplete and cleanup on unmount is handled automatically. Also provides pauseTimeout and resumeTimeout functions for managing existing timeouts.

      Returns {
          clearTimeout: () => void;
          pauseTimeout: () => void;
          resumeTimeout: () => void;
          setTimeout: (handler: Function, timeout: number) => void;
      }