1.0.1 • Published 4 years ago
use-window-resize-value v1.0.1
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.