@bnidev/js-utils
    Preparing search index...

    Function onWindowResize

    • Registers a debounced callback for the window resize event.

      Parameters

      • callback: () => void

        The function to call after a resize event.

      • delay: number = 50

        Debounce delay in milliseconds. Defaults to 50.

      Returns () => void

      A cleanup function to remove the event listener.

      onWindowResize(() => {
      console.log('Window resized')
      }, 100)