Skip to content

FezVrasta/react-resize-aware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-resize-aware

A simple React.js component you can use to make any piece of UI aware of its size.

Each time the component changes its size (it can be due to a window resize, a CSS change, a JS action, etc...) a resize event will be fired on the component itself.

You can then listen to such event to perform any kind of operation.

This component doesn't rely on intervals, loops or any other weird stuff.
It takes advantage of the resize event of the <object> HTML element.

It requires just React.js and ReactDOM.

Install it with

npm install react-resize-aware --save

License

MIT License Copyright 2016, Federico Zivolo

About

⇲👁 A simple React Hook which allows to listen the resize event of any target element when it changes sizes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 17