@reach-ui-fork/window-size
v0.18.1
Published
Measure the window size in React
Downloads
1
Readme
@reach-ui-fork/window-size
Measure the current window dimensions.
import WindowSize, { useWindowSize } from "@reach-ui-fork/window-size";
function Example() {
const { width, height } = useWindowSize();
return (
<div>
<p>
Looks like a pretty{" "}
{width <= 400 ? "small" : width >= 1000 ? "large" : "normal"} screen!
</p>
</div>
);
}