Module

Interface for defining modules in the MVLI architecture.

A module owns a slice of application state, a reducer for transforming that state, and a logic factory for creating the logic instance that handles side effects.

For type-safe logic access without casting, prefer ModuleWithLogic.

Inheritors

Properties

Link copied to clipboard
abstract val createLogic: (storeAccessor: StoreAccessor) -> ModuleLogic
Link copied to clipboard
open val createMiddleware: () -> Middleware?

Optional factory for creating a middleware provided by this module.

Link copied to clipboard
abstract val initialState: S
Link copied to clipboard
abstract val reducer: (S, A) -> S

Functions

Link copied to clipboard
open suspend fun selectLogic(store: StoreAccessor): ModuleLogic
Link copied to clipboard
open fun selectStateFlowNonSuspend(store: StoreAccessor): StateFlow<S>