Skip to content

//reactivestate-compose/com.ensody.reactivestate.compose/reactiveState

reactiveState

[compose]\

@ExperimentalReactiveStateApi

@Composable

inline fun <E : ErrorEvents, VM : ReactiveState<E>> E.reactiveState(key: String? = null, crossinline observeLoadingEffect: @Composable(viewModel: VM) -> Unit, crossinline provider: ReactiveStateContext.() -> VM): VM

Creates a multiplatform ReactiveState ViewModel and observes its ReactiveState.eventNotifier.

The provider should instantiate the object directly.