Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 327 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 327 Bytes

React Scroll Lock

Prevent scroll on the <body /> when component is mounted.

Usage

npm install --save react-scrolllock
import ScrollLock from 'react-scrolllock';

class Modal extends Component {
  render () {
    return (
      <div>
        ...
        <ScrollLock />
      </div>
    )
  }
}