React hook returning only the current value of an Alien Signal (or computed). No setter is provided.
The type of the signal value.
The signal to read.
The current value.
const countSignal = createSignal(0);const doubleSignal = createComputed(() => countSignal.get() * 2);function Display() { const count = useSignalValue(countSignal); const double = useSignalValue(doubleSignal); return <div>{count}, {double}</div>;} Copy
const countSignal = createSignal(0);const doubleSignal = createComputed(() => countSignal.get() * 2);function Display() { const count = useSignalValue(countSignal); const double = useSignalValue(doubleSignal); return <div>{count}, {double}</div>;}
React hook returning only the current value of an Alien Signal (or computed). No setter is provided.