Google is committed to advancing racial equity for Black communities. See how.

DisposableEffectScope

class DisposableEffectScope
kotlin.Any
   ↳ androidx.compose.runtime.DisposableEffectScope

Receiver scope for DisposableEffect that offers the onDispose clause that should be the last statement in any call to DisposableEffect.

Summary

Public constructors

Receiver scope for DisposableEffect that offers the onDispose clause that should be the last statement in any call to DisposableEffect.

Public methods
DisposableEffectDisposable
onDispose(crossinline onDisposeEffect: () -> Unit)

Provide onDisposeEffect to the DisposableEffect to run when it leaves the composition or its subject changes.

Public constructors

<init>

DisposableEffectScope()

Receiver scope for DisposableEffect that offers the onDispose clause that should be the last statement in any call to DisposableEffect.

Public methods

onDispose

inline fun onDispose(crossinline onDisposeEffect: () -> Unit): DisposableEffectDisposable

Provide onDisposeEffect to the DisposableEffect to run when it leaves the composition or its subject changes.