Socket
Book a DemoInstallSign in
Socket

use-window-resize-value

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-window-resize-value

A simple React hook that returns the value of the window on resize

1.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

use-window-resize-value

A simple React hook that returns the pixel value of the window width on resize.

NPM JavaScript Style Guide

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.

FAQs

Package last updated on 27 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.