com.raquo.airstream.state
Type members
Classlikes
DerivedVar has the same Var contract as SourceVar, but instead of maintaining its own state it is essentially a lens on the underlying SourceVar.
DerivedVar has the same Var contract as SourceVar, but instead of maintaining its own state it is essentially a lens on the underlying SourceVar.
This Var is active for as long as its signal has listeners.
Being a StrictSignal, it already starts out with a subscription owned by owner
,
but even if owner kills its subscriptions, this Var's signal might have other listeners.
This class adds a noop observer to signal
, ensuring that its current value is computed.
It then lets you query signal
's current value with now
and tryNow
methods (see StrictSignal),
as well as kill the subscription (see OwnedSignal)
This class adds a noop observer to signal
, ensuring that its current value is computed.
It then lets you query signal
's current value with now
and tryNow
methods (see StrictSignal),
as well as kill the subscription (see OwnedSignal)
The regular Var that's created with Var.apply
.
The regular Var that's created with Var.apply
.
See also DerivedVar, created with myVar.zoom(a => b)(b => a)(owner)
A Signal that lets you directly query its current value.
A Signal that lets you directly query its current value.
This means that its current value is kept up to date regardless of observers. How this is actually accomplished is up to the concrete class extending this trait.
Var is essentially a Signal that you can write to, so it's a source of state like EventBus is a source of events.
Var is essentially a Signal that you can write to, so it's a source of state like EventBus is a source of events.
There are two kinds of Vars: SourceVar and DerivedVar. The latter you can obtain by calling zoom(a => b, b => a) on a Var, however, unlike SourceVar, DerivedVar requires an Owner in order to run.
- Companion:
- object