ReactiveState
An interface for ViewModels and any other objects that can trigger one-time events/actions and handle errors.
Make sure you always launch coroutines via launch (instead of the scope) to get automatic error handling.
See also
for a ready-made base class (or delegate).
Inheritors
Functions
Watches observables for changes. Often useful to keep things in sync (e.g. CoroutineLauncher -> UI).
Watches observables for changes. Often useful to keep things in sync (e.g. CoroutineLauncher -> UI).
Creates a StateFlow that computes its value based on other StateFlows via an autoRun block.
Creates a StateFlow that computes its value based on other StateFlows via a suspendable coAutoRun block.
Helper for adding a completion handler to a CoroutineLauncher.
Launches a coroutine. Mark long-running coroutines by setting withLoading to loading state.
Launches a coroutine without any error handling or loading state tracking.
Runs OnInit.trigger for this class.