React hook that subscribes to a readable Alien Signal (either writable or computed) and returns its current value.
The type of the signal value.
The readable signal.
The current value of the signal.
const count = createSignal(0);const double = createComputed(() => count() * 2);function Display() { const countValue = useSignalValue(count); const doubleValue = useSignalValue(double); return <div>Count: {countValue}, Double: {doubleValue}</div>;} Copy
const count = createSignal(0);const double = createComputed(() => count() * 2);function Display() { const countValue = useSignalValue(count); const doubleValue = useSignalValue(double); return <div>Count: {countValue}, Double: {doubleValue}</div>;}
React hook that subscribes to a readable Alien Signal (either writable or computed) and returns its current value.