1.0.2 • Published 2 years ago

windowsize-hook-react v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

windowsize-hook-react

npm install windowsize-hook-react

or

yarn add windowsize-hook-react

About

Window size hook for React.

Installation

npm install --save windowsize-hook-react

Importing the hook

import useWindowSize from "windowsize-hook-react"

Usage

function ShowSize() {
  const { width, height } = useWindowSize();

  return (
    <div>
      <p>{width, height}</p>
    </div>
  );
}