use-screen-width
v1.0.3
Published
> This helps you get the current screen width value
Downloads
2
Readme
use-screen-size
This helps you get the current screen width value
Install
npm install --save use-screen-width
yarn add use-screen-width
Example
This shows a quick example of displaying your screen width, screen height and current screen mode
import React from 'react'
import { useScreenWidth } from 'use-screen-width'
const App = () => {
const { screenWidth } = useScreenWidth()
return (
<>
<h1>Screen width: {screenWidth}px</h1>
</>
)
}