Package-level declarations

Functions

Link copied to clipboard
fun <T> localStoreOf(defaultFactory: () -> Store<T> = { null!! }): ProvidableCompositionLocal<Store<T>>

Creates static CompositionLocal for a Store with a given state T.

Link copied to clipboard
@Composable
fun <AppState, Selected> CompositionLocal<Store<AppState>>.selectAsState(selector: Selector<AppState, Selected>): State<Selected>

Selects part of a state as a Compose State from composition local store using selector.

Selects part of a state using given selector as a Compose State.

@Composable
fun <AppState, Selected> Store<AppState>.selectAsState(selectorFunction: SelectorFunction<AppState, Selected>): State<Selected>

Selects part of a state as a Compose State from composition local store using selectorFunction.

Properties

Link copied to clipboard
@get:Composable
val <AppState> CompositionLocal<Store<AppState>>.dispatch: DispatchFunction

Returns a dispatch function for a composition local store.

Link copied to clipboard
@get:Composable
val <AppState> CompositionLocal<Store<AppState>>.dispatchJob: (ForegroundJobAction) -> Job

Returns a dispatchJob function for a composition local store.

Link copied to clipboard
@get:Composable
val <AppState> CompositionLocal<Store<AppState>>.dispatchJobIn: (ForegroundJobAction, CoroutineScope) -> Unit

Returns a dispatchJobIn function for a composition local store.

Link copied to clipboard
@get:Composable
val <AppState> CompositionLocal<Store<AppState>>.dispatchJobInHere: (ForegroundJobAction) -> Unit

Returns a dispatchJobIn function for a composition local store. It provides a CoroutineScope from rememberCoroutineScope. It results in an automatic cancellation of any foreground coroutine triggered by this function at a composable disposal.

Link copied to clipboard
@get:Composable
val <AppState> CompositionLocal<Store<AppState>>.joinDispatchJob: suspend (ForegroundJobAction) -> Unit

Returns a joinDispatchJob function for a composition local store.