
Research
Malicious Go “crypto” Module Steals Passwords and Deploys Rekoobe Backdoor
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.
@charlietango/use-interaction
Advanced tools
Monitor the user interactions on an element
Checkout the Storybook demo.
yarn add @charlietango/use-interaction
If the application is using the focus-visible polyfill, then the class it adds will be detected and used to report the status of
focusVisible.
const [ref, status] = useInteraction(options)
The hook returns an Array with a ref function, and the current interaction status.
Assign the ref to the element you want to monitor.
statusThe status is an object containing a boolean for each of the following properties:
active - The user is currently pressing the element, either with the mouse or touchfocus - The element has focusfocusVisible - The focus outline shouldn't be shown - Enabled if using focus-visible polyfillfocusWithin - An element inside this element currently has focus. This will also affect focusVisiblehover - The user is hovering over the element with the mouse, or it was touched and still has focusThe useInteraction hook accepts an object with these optional options, that give you a bit more control.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| onInteraction | (event, status) => void | undefined | false | Callback function that's triggered whenever an interaction event occurs. Receives the new status. Make sure this function is memorized with useCallback. |
| skip | boolean | false | false | Skip adding any event listeners. |
import React from 'react'
import useInteraction from '@charlietango/use-interaction'
const Component = () => {
const [ref, status] = useInteraction()
return <div ref={ref}>Hovering: {status.hover}</div>
}
export default Component
import React from 'react'
import useInteraction from '@charlietango/use-interaction'
const Component = () => {
const onInteraction = React.useCallback((event, status) => {
// Log out the latest event
console.log(event.type, status)
}, [])
const [ref, status] = useInteraction({ onInteraction })
return <div ref={ref}>Hovering: {status.hover}</div>
}
export default Component
FAQs
Monitor the user interactions on an element
The npm package @charlietango/use-interaction receives a total of 2 weekly downloads. As such, @charlietango/use-interaction popularity was classified as not popular.
We found that @charlietango/use-interaction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.