
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.
@qyu/signal-react
Advanced tools
Utility react hooks for @qyu/signal-core
Creates OSignal, updates it's value after render
const App = () => {
const param = 10
const root = useSignalValue(
0,
// dependencies, optional
[10]
)
}
Extracts Signal output value to state, rerender when it updates
const App = () => {
const root_output = useSignalOutput(root)
}
Same as useSignalOutput, but does not initialise value immediately and instead waits for effect. Prevents unnecesary updates for memorized signals
const App = () => {
const root_connection = useSignalConnect(root)
if (root_connection.active) {
// prints root output
console.log("active", root_connection.value)
} else {
// prints null
console.log("active", root_connection.value)
}
}
Will fire event on deps change
const App = () => {
// config is optional
// will schedule all updates to a microtask to properly batch them
// if instant: true - will emit immediately
const esignal_deps = useSignalEventDeps([1, ""], { instant: false })
}
Will attach listener to target
const App = () => {
const root = useSignalValue(0)
useSignalEffect({
target: root,
listener: target => console.log(target.output()),
config: {
// emit on initial effect
emit: true
}
})
}
const App = (props) => {
const root = useSignalValue(0)
const ref = useRef<HTMLElement | null>()
// will update left when root updates
useDOMStyle(() => ref.current, "left", osignal_new_pipe(root, v => `${v}px`))
// will update left and background
useDOMStyles(
() => ref.current,
osignal_new_mergemap({
backgroundColor: props.background,
left: osignal_new_pipe(root, v => `${v}px`)
})
)
}
const App = (props) => {
const root = useSignalValue(0)
const ref = useRef<HTMLElement | null>()
// will update data-left when root updates
useDOMAttribute(() => ref.current, "data-left", osignal_new_pipe(root, v => `${v}px`))
// will update data-left and data-background
useDOMAttributes(
() => ref.current,
osignal_new_mergemap({
"data-background": props.background,
"data-left": osignal_new_pipe(root, v => `${v}px`)
})
)
}
FAQs
React hooks for @qyu/signal-core
The npm package @qyu/signal-react receives a total of 71 weekly downloads. As such, @qyu/signal-react popularity was classified as not popular.
We found that @qyu/signal-react demonstrated a healthy version release cadence and project activity because the last version was released less than 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.