Package-level declarations

Types

Link copied to clipboard
interface CrashListener

Listener for crashes that occur during logic execution in the Store.

Link copied to clipboard

Determines how the Store should handle a crash after listeners are notified.

Link copied to clipboard
typealias Dispatch = (ModuleAction) -> Unit
Link copied to clipboard
sealed class DispatchResult

Result of a dispatch operation, indicating whether the action was processed.

Link copied to clipboard
typealias DispatchSuspend = suspend (ModuleAction) -> Unit
Link copied to clipboard

Marker interface for high-priority actions.

Link copied to clipboard

Internal operations for specialized use cases like DevTools and testing.

Link copied to clipboard
interface Logic
Link copied to clipboard
typealias Middleware = suspend (action: ModuleAction, getAllStates: suspend () -> Map<String, ModuleState>, storeAccessor: StoreAccessor, updatedState: suspend (ModuleAction) -> ModuleState) -> Unit

Type alias for middleware functions.

Link copied to clipboard

Interface for defining modules in the MVLI architecture.

Link copied to clipboard
@Serializable
abstract class ModuleAction(moduleTag: KClass<*> = KClass::class)

Base class for module actions.

Link copied to clipboard
open class ModuleLogic : Logic

Base class for module logic implementations.

Link copied to clipboard
interface ModuleState

Marker interface for module state classes.

Link copied to clipboard

The recommended interface for defining modules with type-safe logic access.

Link copied to clipboard
@ObjCName(name = "StateSelector")
open class StateSelector<S : ModuleState>

Generic state selector for Swift/iOS. Wraps KClass internally so Swift doesn't need to deal with it.

Link copied to clipboard
Link copied to clipboard
abstract class StoreAccessor(scope: CoroutineScope) : CoroutineScope

Provides access to dispatch, state selection, and logic selection.

Link copied to clipboard
class StoreDSL

Functions

Link copied to clipboard
fun createStore(block: StoreDSL.() -> Unit): Store

Creates a new Store instance using the DSL builder.