Package-level declarations
Types
Link copied to clipboard
class ComponentTreeScope(lithoTree: LithoTree, val coroutineContext: CoroutineContext) : CoroutineScope
A CoroutineScope that is scoped to whether the ComponentTree is released.
Link copied to clipboard
Properties
Link copied to clipboard
Lazily creates a CoroutineScope that will be active as long as the ComponentTree is not released. This scope will be canceled when the ComponentTree is released.
Functions
Link copied to clipboard
fun ComponentScope.useComponentCoroutineScope(coroutineContext: CoroutineContext = EmptyCoroutineContext): CoroutineScope
Return a CoroutineScope that is be active as long as the Component in which it was created is present in the UI tree. The same CoroutineScope instance will be returned across re-renders.
Link copied to clipboard
Launches a coroutine with onLaunch. The coroutine will be canceled when the component is detached, or if the coroutine will be relaunched.
Link copied to clipboard
fun <T> ComponentScope.useFlowWithLifecycle(stateFlow: StateFlow<T>, minActiveState: Lifecycle.State = Lifecycle.State.RESUMED): T
Returns the current value of a given stateFlow.
Link copied to clipboard
fun <T> ComponentScope.useProducer(initialValue: () -> T, vararg keys: Any?, producer: suspend StateProducerScope<T>.() -> Unit): T
Creates a value that is updatable by a given producer coroutine. Whenever producer updates the value, the component will be re-rendered.