
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
react-mouse-aware
Advanced tools
A tiny higher order component to track mouse state.
import { Component } from 'react';
import { mouseAware } from 'react-mouse-aware';
@mouseAware({ // same as default options
inDelay: 0,
outDelay: 0,
inHandler: 'onMouseEnter',
outHandler: 'onMouseLeave',
key: 'isOver'
})
@mouseAware({
inDelay: 300,
outDelay: 100,
inHandler: 'onMouseDown',
outHandler: 'onMouseUp',
key: 'isPressed'
})
class CustomComponent extends Component {
render() {
// props will include the in and out handlers
let { isOver, isPressed, className, ...props } = this.props;
if (isOver) className += ' hovered'; // mouse is over component
if (isPressed) className += ' active'; // mouse has been held down for 300ms or was just released
return (
<div {...props} className={className}>
</div>
)
}
};
@mouseAware(options)
export default class Test extends React.Component {
/* your code */
}
class Test extends React.Component {
/* your code */
}
export default mouseAware(options)(Test);
inDelay defaults to 0Time in ms to wait before setting the active status to true.
outDelay defaults to 0Time in ms to wait before setting the active status to false.
inHandler defaults to 'onMouseEnter'Property name to expose the inHandler as.
outHandler defaults to 'onMouseLeave'Property name to expose the outHandler as.
openFunction no defaultProperty name to expose the force open function as. This function will ignore the in delay
closeFunction no defaultProperty name to expose the force close function as. This function will ignore the out delay.
key defaults to 'isOver'Property name to expose the active status as.
FAQs
A tiny higher order component to track mouse state.
The npm package react-mouse-aware receives a total of 5 weekly downloads. As such, react-mouse-aware popularity was classified as not popular.
We found that react-mouse-aware 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.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.