useViewportSize

Get the width and height of the window and keep them updated.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

Resize the window to see the values change.

APIs

useViewportSize

const useViewportSize = () => { width: number; height: number }
Edit this page on GitHub