Interface ViewportProps

Props of the useViewport hook.

interface ViewportProps {
    onResize?: ((rect: DOMRect) => void);
}

Properties

Properties

onResize?: ((rect: DOMRect) => void)

A handler that is called when a viewport is resized.

Type declaration

    • (rect): void
    • Parameters

      • rect: DOMRect

        A viewport bounding rect.

      Returns void