React hook returning only a setter function for an Alien Signal. No current value is provided, similar to Jotai's useSetAtom.
The type of the signal value.
The signal to write.
A setter function.
const countSignal = createSignal(0);function Incrementor() { const setCount = useSetSignal(countSignal); return <button onClick={() => setCount((c) => c + 1)}>+1</button>;} Copy
const countSignal = createSignal(0);function Incrementor() { const setCount = useSetSignal(countSignal); return <button onClick={() => setCount((c) => c + 1)}>+1</button>;}
React hook returning only a setter function for an Alien Signal. No current value is provided, similar to Jotai's useSetAtom.