Skip to main content

useWindowSize

Definition

  • useWindowSize is a hook which return ts height, ts widht when resizing the window.

Usage Example

import { useWindowSize } from '@utiliser/react-hooks'

const App = () => {
const { height, width } = useWindowSize()

return (
<div>
<p>{height}</p>
<p>{width}</p>
</div>
)
}

export default App