Package-level declarations

Functions

Link copied to clipboard

Observes a module's state as a Compose State.

inline fun <S : ModuleState> composeState(initialValue: S): State<S>

Observes a module's state as a Compose State with an initial value for previews.

Link copied to clipboard
inline fun <S : ModuleState, T> onActiveValueChange(crossinline selector: (S) -> T, crossinline onChange: suspend (T) -> Unit)

Watches a selected value from state and triggers a callback when it changes.

Link copied to clipboard

Provides access to the store's dispatch function for firing actions.

Link copied to clipboard

Retrieves the Store from the CompositionLocal provided by StoreProvider.

Link copied to clipboard
inline fun <T : ModuleState, R> select(crossinline selector: (T) -> R, noinline areEqual: (R, R) -> Boolean = { old, new -> old == new }): State<R>

Creates derived state from a module state using a selector function.

Link copied to clipboard
inline fun <S : ModuleState> selectState(): StateFlow<S>

Selects a module's state as a StateFlow.

inline fun <S : ModuleState> selectState(initialValue: S): StateFlow<S>

Selects a module's state as a StateFlow with an initial value for previews.

Link copied to clipboard
fun StoreProvider(store: Store, content: @Composable () -> Unit)

Provides the Reaktiv store to the Compose hierarchy via CompositionLocal.