OrbitContainerHost

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.

Parameters

INTERNAL_STATE

The container's internal state type.

EXTERNAL_STATE

The container's external (exposed) state type. When the same as INTERNAL_STATE, the container exposes its internal state directly.

SIDE_EFFECT

The type of side effects posted by this container. Can be Nothing if this container never posts side effects.

Properties

Link copied to clipboard

Functions

Link copied to clipboard

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

Link copied to clipboard
open fun intent(registerIdling: Boolean = true, transformer: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit): Job

Build and execute an intent on OrbitContainer.

Link copied to clipboard
open suspend fun subIntent(transformer: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit)

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