commonMain.pro.respawn.flowmvi.api.Consumer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-jvm Show documentation
Show all versions of core-jvm Show documentation
A Kotlin Multiplatform MVI library based on plugins that is simple, fast, powerful & flexible
package pro.respawn.flowmvi.api
/**
* A [consume]r of [Store]'s events that has certain state [S].
* Each [Consumer] needs a container, a way to [send] intents to it,
* a way to [render] the new state, and a way to [consume] side-effects.
*/
public interface Consumer : IntentReceiver {
/**
* Container, an object that wraps a Store.
*/
public val container: Container
override fun send(intent: I): Unit = container.store.send(intent)
override suspend fun emit(intent: I): Unit = container.store.emit(intent)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy