react-ui-hooks icon indicating copy to clipboard operation
react-ui-hooks copied to clipboard

Add two window hooks

Open nolleto opened this issue 7 years ago • 0 comments

Create two hooks:

  • useWindowEvent - React hook that will subscribe to an event in the window when the component is mounted and will unsubscribe the event when the component unmount.
  • useWindowSize - React hook to get the current window size (width, height). This hook will listen to the resize window event to always keep the size up to date.

nolleto avatar Sep 19 '19 18:09 nolleto