AppStore

open class AppStore(initialState: State = FreeDrive.Idle, logger: Logger, scope: CoroutineScope, appDataReducer: AppDataReducer, appDataFactory: AppDataFactory)

Inheritors

Constructors

Link copied to clipboard
constructor(initialState: State = FreeDrive.Idle, logger: Logger, scope: CoroutineScope, appDataReducer: AppDataReducer, appDataFactory: AppDataFactory)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
@TestOnly
fun fork(): AppStore
Link copied to clipboard
fun observeAllEvents(): Flow<Event>

Flow of all events sent to AppStore. Be careful when using this method, as all events will be saved here, regardless of whether transitions are valid or not.

Link copied to clipboard
fun observeData(): Flow<AppData>
Link copied to clipboard
fun observeError(): Flow<AppError>
Link copied to clipboard
Link copied to clipboard
fun observeState(): Flow<State>
Link copied to clipboard
Link copied to clipboard
open fun onEvent(event: Event)
Link copied to clipboard
fun <T> transformData(block: AppData.() -> T): T

Getter for AppData Used when we need get value without using suspend function