
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-use-stack-ref
Advanced tools
a simple stack structure for react hooks
import React, { useState, useCallback, ChangeEvent } from 'react'
import { useStackRef } from 'react-use-stack-ref'
const App = (props: {}) => {
const stack = useStackRef()
const [input, setInput] = useState("")
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
setInput(e.target.value)
}
const handlePush = useCallback(e => {
stack.push(input)
setInput("")
}, [stack])
const handlePop = useCallback(e => {
const value = stack.pop()
value && setInput(value as string)
}, [stack])
return (<>
<h1>live demo for useStackRef</h1>
<input type="text" value={input} onChange={handleChange} />
<button onClick={handlePush} disabled={input.length === 0}>push</button>
<button onClick={handlePop} disabled={stack.size === 0} >pop</button>
<div>current value: {stack.value}</div>
<div>stack depth: {stack.size}</div>
</>)
}
export default App;
FAQs
a simple stack structure for react hooks
We found that react-use-stack-ref 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.