Skip to content

Laiff/react-scroll-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-scroll-lock

Scroll lock mixin for React components

Usage

import ScrollLock from 'react-scroll-lock'

class NeedToLockScroll extends PureComponent {

  render () {
    return (
      <ScrollLock someProp={this.props.someProp}>
        {({ lockElem, someProp}) => (
	  <div ref={lockElem}>
	    {someProp}
	  </div>
        )}
      </ScrollLock>
    )
  }
}

About

Scroll lock component for React components

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published