Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function WindowComponent() {
const { innerWidth, innerHeight, outerHeight, outerWidth } = useWindowSize();
return (
<>
<h1> Window dimensions</h1>
<h3>Resize window to see changes</h3>
<div>
<p>
<span>innerHeight - </span>
<span>{innerHeight}</span>
</p>
<p>
<span>innerWidth - </span>
<span>{innerWidth}</span>
</p>
<p>
<span>outerHeight - </span></p></div>