Skip to content

tkh44/window-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WindowState

Travis npm package

In an idea taken from react-virtualized, all of the scroll events are handled by ONE listener.

Each instance of the component does have a resize listener

<WindowState includeScrollbars={false}>
  ({ scrollTop, winHeight, winWidth }) => {
    console.log(scrollTop)
    return (<div style={{ height: winHeight, width: winWidth }} />)
  }
</WindowState>