Function getValue

  • Gets the current value of a node. The node must be stateful.

    Type Parameters

    • T

    Parameters

    Returns T

    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'