Subscribes to the values published in the referred node.
the cell/signal to subscribe to.
the callback to execute when the node receives a new value.
a function that, when called, will cancel the subscription.
const signal$ = Signal<number>()const r = new Realm()const unsub = r.sub(signal$, console.log)r.pub(signal$, 2)unsub()r.pub(signal$, 3) Copy
const signal$ = Signal<number>()const r = new Realm()const unsub = r.sub(signal$, console.log)r.pub(signal$, 2)unsub()r.pub(signal$, 3)
Subscribes to the values published in the referred node.