a scroll locking hook built for react
npm install use-scroll-lockA simple hook wrapper around scroll-lock built for React. From my experience this library is the most reliable when it comes to scroll locking... so I made it into a hook.
```
yarn add use-scroll-lock
useScrollLock accepts two optional arguments.
- enabled - Whether the scroll locking is enabled. By default this is true.
- container - An optional container which permits scrollable content even when scrolling is locked.
`jsx
function Example() {
const [enabled, setEnabled] = React.useState(false);
const ref = React.useRef(null);
useScrollLock(enabled, ref);
return (