selectState

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

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

Return

StateFlow of the requested state type

Parameters

initialValue

The initial state value to use before the store is ready


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

Selects a module's state as a StateFlow.

For most use cases, prefer using composeState() which returns a Compose State that automatically triggers recomposition.

Return

StateFlow of the requested state type