werkbank
    Preparing search index...

    Function useResize

    • Subscribes to window resize events.

      Parameters

      • fn: (e: UIEvent) => void

        The callback to execute on resize.

      • options: UseResizeOptions = {}

        Configuration options (debounceTime).

      Returns void

      This hook listens to the global resize$ observable and triggers the callback when the window is resized. It supports debouncing to prevent excessive callback execution.

      useResize(() => {
      console.log("Window resized");
      }, { debounceTime: 100 });