StoreContext

Pure actor context — the minimal contract for action execution.

Provides a StateStore for state reads/updates, a CoroutineScope, and a type-safe effect for fire-and-forget sub-action dispatch.

SDK-specific concerns (storage, persistence) live in BaseContext.

Inheritors

Properties

Link copied to clipboard
abstract val actor: StateActor<Self, S>
Link copied to clipboard
abstract val scope: CoroutineScope
Link copied to clipboard
open override val state: StateFlow<S>

Delegate state reads to the actor.

Functions

Link copied to clipboard
open fun effect(action: TypedAction<Self>)

Fire-and-forget dispatch of a sub-action on this context's actor.

Link copied to clipboard
open suspend fun immediate(action: TypedAction<Self>)
Link copied to clipboard
open suspend fun immediateUntil(action: TypedAction<Self>, until: (S) -> Boolean)
Link copied to clipboard
open fun sideEffect(what: suspend () -> Unit)
Link copied to clipboard
open override fun update(reducer: Reducer<S>)

Apply a state reducer inline.