A dynamic, time-varying value.
const prop = new Behavior<number>(0);prop.subscribe(() => { console.log("property updated: ", prop.value);}); // prints: "property updated: 0"prop.next(1); // "property updated: 1"prop.next(2); // "property updated: 2" ... Copy
const prop = new Behavior<number>(0);prop.subscribe(() => { console.log("property updated: ", prop.value);}); // prints: "property updated: 0"prop.next(1); // "property updated: 1"prop.next(2); // "property updated: 2" ...
A Behavior is a Wire which is constructed with an initial value.
Protected
Flag indicating whether the wire has finished execution.
Intended to be idempotent.
In addition to the behavior of Wire.next this updates the internal value.
In addition to the behavior of Wire.subscribe this immediately invokes the observer with the value.
Generated using TypeDoc
A dynamic, time-varying value.
See
Example