LifecycleEventsEffect
fun LifecycleEventsEffect(vararg events: Lifecycle.Event, onEvent: (Lifecycle.Event) -> Unit)(source)
A side effect that listens for specific Lifecycle.Event transitions in the current LocalLifecycleOwner.
This effect automatically handles the registration and unregistration of a LifecycleEventObserver when the Composable enters or leaves the composition.
Parameters
events
The lifecycle events to observe.
onEvent
A callback invoked when any of the specified events occur.