@alobato/use-lock-body-scroll

1.0.0 • Public • Published

useLockBodyScroll

React hook to lock body scroll

Note: This is using the new React Hooks API

You'll need to install react, react-dom, etc at ^16.8.0 or above

Install

yarn add @alobato/use-lock-body-scroll

Usage

import useLockBodyScroll from '@alobato/use-lock-body-scroll'

export default memo(() => {
  if (hasBackdrop) useLockBodyScroll()
  ...

Readme

Keywords

Package Sidebar

Install

npm i @alobato/use-lock-body-scroll

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

2.38 kB

Total Files

4

Last publish

Collaborators

  • alobato