An open API service indexing awesome lists of open source software.

https://github.com/halo-lab/use-resizing

React Hook that triggers on window resize
https://github.com/halo-lab/use-resizing

hooks react reactjs resize

Last synced: about 1 year ago
JSON representation

React Hook that triggers on window resize

Awesome Lists containing this project

README

          

useResizing

React Hook that triggers on window resize




Example


In your React component:

```
import useResize from "use-resizing"

function SizeInfo() {
const screenSize = useResize()

return

size = ({ screenSize.width }, { screenSize.height })

}
```

Settings:


debounceTime - number (default 100ms)

```
...
const screenSize = useResize({debounceTime:200})
```

## Word from author

Have fun! ✌️


Supported by Halo lab