Signal
A flow can be thought of as a combination of a io.github.yafrl.behaviors.Behavior and an Event.
Like a io.github.yafrl.behaviors.Behavior, a Signal has a current value which can be sampled at any time.
Like an Event, a Signal will automatically influence derived Signals when the underlying state changes -- in other words, it is reactive.
Following our graphical analogies for Event and io.github.yafrl.behaviors.Behavior, a Signal can be thought of as a stepwise function.
^
| ********
| ****
| ******** ********
| *********
---------------------------------------->
Signals are incredibly useful for representing the state of various components in an application which need to be consumed in responsive user interfaces.
They are very similar to kotlinx.coroutines.flow.StateFlows in this sense -- only better.
Inheritors
Properties
Functions
Launches a handler that asynchronously listens to updates on the state.