@ibnlanre/use-viewport-height
v1.1.0
Published
calculates element's height required to fill the viewport
Downloads
0
Readme
use-viewport-height
Calculates element's height required to fill the viewport.
Usage
import { useRef } from "react";
function Example() {
const exampleRef = useRef();
const height = useViewportHeight(exampleRef);
return (<div ref={ref} style={{ height }} />)
}