🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

use-hide-scrollbar

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-hide-scrollbar

custom react hook to hide browser scrollbar

1.0.19
latest
Source
npm
Version published
Weekly downloads
40
471.43%
Maintainers
1
Weekly downloads
 
Created
Source

use-hide-scrollbar

custom react hook to hide browser scrollbar

Install

yarn add use-hide-scrollbar

Usage

import React from 'react';
import {useHideScrollbar} from "use-hide-scrollbar";
const App = () => {

  const [trigger, setTrigger] = useState(false);
  useHideScrollbar(trigger);
  console.log(trigger)
  return (
    <div>
      <button onClick={() => setTrigger(prev => !prev)}>Click me!</button>
    </div>
  );
}

All you need is to pass a boolean as a parameter

  useHideScrollbar(trigger);

Show your support

Give a ⭐️ if this project helped you!

Keywords

custom react hook

FAQs

Package last updated on 19 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts