Skip to content

danielkhoo/react-use-window-size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

useWindowSize - Custom React Hook

A custom React Hook to get the window dimensions including resizing.

Useful for implementing responsive behavior, modifying elements for different screen sizes.

Install

$ npm install react-use-window-size

Usage

import useWindowSize from './useWindowSize';

const { width, height } = useWindowSize();

console.log(width, height); //Current window size i.e. 1366 768

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published