Gets the current value of a node. The node must be stateful.
the node instance.
if possible, use withLatestFrom or combine, as getValue will not create a dependency to the passed node, which means that if you call it within a computational cycle, you may not get the correct value.
const foo$ = Cell('foo')const r = new Realm()r.getValue(foo$) // 'foo'r.pub(foo$, 'bar')//...r.getValue(foo$) // 'bar' Copy
const foo$ = Cell('foo')const r = new Realm()r.getValue(foo$) // 'foo'r.pub(foo$, 'bar')//...r.getValue(foo$) // 'bar'
Gets the current value of a node. The node must be stateful.