
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
use-set-timeout
Advanced tools
A React Hook (using useEffect) which uses window.setTimeout().
In your React component:
import { useState } from 'react'
import useSetTimeout from "use-set-timeout"
function SetTimeout() {
const [ triggered, setTriggered ] = useState(false)
useSetTimeout(() => { setTriggered(true) }, 5 * 1000)
return <p>triggered = { triggered }</p>
}
There is no need to keep a reference to the timeout ID since it will be automatically cleared when the component unmounts.
Please note that the timeout is cleared and reset if you change the timeout ms but not if you change the function fn.
useSetTimeout(fn, delay)
fn is a function to executedelay is the delay in millisecondsPlease see all of the other reacthooks.org hooks:
document.title.usePrefersColorScheme() - Get whether the user prefers the 'light' or 'dark' color schemesetTimeout()setInterval()$ npx chilts
╒════════════════════════════════════════════════════╕
│ │
│ Andrew Chilton (Personal) │
│ ------------------------- │
│ │
│ Email : andychilton@gmail.com │
│ Web : https://chilts.org │
│ Twitter : https://twitter.com/andychilton │
│ GitHub : https://github.com/chilts │
│ GitLab : https://gitlab.org/chilts │
│ │
│ Apps Attic Ltd (My Company) │
│ --------------------------- │
│ │
│ Email : chilts@appsattic.com │
│ Web : https://appsattic.com │
│ Twitter : https://twitter.com/AppsAttic │
│ GitLab : https://gitlab.com/appsattic │
│ │
│ Node.js / npm │
│ ------------- │
│ │
│ Profile : https://www.npmjs.com/~chilts │
│ Card : $ npx chilts │
│ │
╘════════════════════════════════════════════════════╛
(Ends)
FAQs
A React Hook (using useEffect) which uses window.setTimeout().
The npm package use-set-timeout receives a total of 15 weekly downloads. As such, use-set-timeout popularity was classified as not popular.
We found that use-set-timeout 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.