use-window-resize-value
v1.0.1
Published
A simple React hook that returns the value of the window on resize
Downloads
102
Readme
use-window-resize-value
A simple React hook that returns the pixel value of the window width on resize.
Install
npm install --save use-window-resize-value
Usage
import React from 'react'
import { useWindowResizeValue } from 'use-window-resize-value'
const App = () => {
const windowWidth = useWindowResizeValue()
return <h1>The current width of the window is: {windowWidth}px</h1>
}
export default App
License
MIT © TheLeePriest
This hook is created using create-react-hook.