Skip to content

Instantly share code, notes, and snippets.

@MkhytarMkhoian
Created May 13, 2024 20:00
Show Gist options
  • Save MkhytarMkhoian/514cae633de3106f6ae525ecbd5b4bc3 to your computer and use it in GitHub Desktop.
Save MkhytarMkhoian/514cae633de3106f6ae525ecbd5b4bc3 to your computer and use it in GitHub Desktop.
@Composable
fun <STATE : Any, SIDE_EFFECT : Any> ContainerHost<STATE, SIDE_EFFECT>.collectSideEffect(
lifecycleState: Lifecycle.State = Lifecycle.State.STARTED,
action: (suspend (sideEffect: SIDE_EFFECT) -> Unit),
) {
this.collectSideEffect(sideEffect = action, lifecycleState = lifecycleState)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment