commonMain.dev.stateholder.extensions.CollectAsState.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of extensions-compose-jvm Show documentation
Show all versions of extensions-compose-jvm Show documentation
A simple library for managing state in Kotlin Multiplatform projects, using Kotlin Coroutines and `StateFlow`.
package dev.stateholder.extensions
import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import com.arkivanov.essenty.lifecycle.Lifecycle
import dev.stateholder.StateOwner
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
@Composable
public expect fun StateOwner.collectAsState(
minActiveState: Lifecycle.State = Lifecycle.State.STARTED,
context: CoroutineContext = EmptyCoroutineContext,
): State
© 2015 - 2024 Weber Informatics LLC | Privacy Policy