ContainerHost

Apply this interface to anything you want to become an orbit container host. Typically this will be an Android ViewModel but it can be applied to simple presenters etc.

Extension functions intent and orbit are provided as a convenient way of launching orbit intents on the container.

Properties

Link copied to clipboard

The orbit Container instance.

Functions

Link copied to clipboard
fun <STATE : Any, SIDE_EFFECT : Any> ContainerHost<STATE, SIDE_EFFECT>.blockingIntent(registerIdling: Boolean = true, transformer: suspend SimpleSyntax<STATE, SIDE_EFFECT>.() -> Unit)

Build and execute an intent on Container in a blocking manner, without dispatching.

Link copied to clipboard
fun <STATE : Any, SIDE_EFFECT : Any> ContainerHost<STATE, SIDE_EFFECT>.intent(registerIdling: Boolean = true, transformer: suspend SimpleSyntax<STATE, SIDE_EFFECT>.() -> Unit): Job

Build and execute an intent on Container.

Link copied to clipboard
suspend fun <STATE : Any, SIDE_EFFECT : Any> ContainerHost<STATE, SIDE_EFFECT>.subIntent(transformer: suspend SimpleSyntax<STATE, SIDE_EFFECT>.() -> Unit)

Used for parallel decomposition or subdivision of a larger intent into smaller parts.