Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-wheeler
Advanced tools
React component for listening to and acting on scroll/wheel/touchmove events.
React component for listening to and acting on scroll/wheel/touchmove events.
Installation
yarn add react-wheeler
As a component
import Wheeler from 'react-wheeler';
const YourComponent = () => {
const handleWheelStart = () => {};
const handleWheel = ({ delta }) => {};
const handleWheelEnd = ({ delta }) => {};
return (
<>
<Wheeler
onWheel={handleWheel}
onWheelStart={handleWheelStart}
onWheelEnd={handleWheelEnd}
/>
</>
);
};
Prop | Type | Default | Description |
---|---|---|---|
throttle | Number | 20 | How many milliseconds between each onWheel event |
onWheelStart | func | Fired when wheeling starts | |
onWheel | func | Fired while wheeling | |
onWheelEnd | func | Fired when wheeling has stopped | |
event | String | 'auto' | Which event to listen to. Possible values 'auto', 'wheel', 'touch' |
elementRef | React ref | Element reference created with React.createRef(). Required for touch |
yarn install
to install dependencies
yarn start
to start the file watcher to automatically build on file changes
I'm open for pull requests if you've got any enhancements! You're a star! ⭐
FAQs
React component for listening to and acting on scroll/wheel/touchmove events.
We found that react-wheeler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.