container

fun <STATE : Any, SIDE_EFFECT : Any> CoroutineScope.container(initialState: STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<STATE, STATE, SIDE_EFFECT>(source)

Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, buildSettings, onCreate)

Helps create a concrete container in a standard way.

Return

An OrbitContainer implementation

Parameters

initialState

The initial state of the container.

buildSettings

This builder can be used to change the container's settings.

onCreate

The lambda to execute when the container is created. By default it is executed in a lazy manner when the container is first interacted with in any way.


fun <INTERNAL_STATE : Any, EXTERNAL_STATE : Any, SIDE_EFFECT : Any> CoroutineScope.container(initialState: INTERNAL_STATE, transformState: (INTERNAL_STATE) -> EXTERNAL_STATE, buildSettings: SettingsBuilder.() -> Unit = {}, onCreate: suspend Syntax<INTERNAL_STATE, SIDE_EFFECT>.() -> Unit? = null): OrbitContainer<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>(source)

Deprecated

Use orbitContainer instead

Replace with

orbitContainer(initialState, transformState, buildSettings, onCreate)

Helps create a concrete container with external state transformation in a standard way.

Return

An OrbitContainer implementation

Parameters

initialState

The initial state of the container.

transformState

The function that transforms the internal state to the external state.

buildSettings

This builder can be used to change the container's settings.

onCreate

The lambda to execute when the container is created. By default it is executed in a lazy manner when the container is first interacted with in any way.