React hook for running a side effect whenever Alien Signals' dependencies used in fn change. The effect is cleaned up on component unmount.
fn
The effect function to run.
function Logger() { useSignalEffect(() => { console.log('Signal changed:', someSignal.get()); }); return null;} Copy
function Logger() { useSignalEffect(() => { console.log('Signal changed:', someSignal.get()); }); return null;}
React hook for running a side effect whenever Alien Signals' dependencies used in
fn
change. The effect is cleaned up on component unmount.