Skip to content

//reactivestate-compose/com.ensody.reactivestate.compose/reactiveViewModel

reactiveViewModel

[compose]\

@ExperimentalReactiveStateApi

@Composable

inline fun <VM : ReactiveViewModel> ErrorEvents.reactiveViewModel(key: String? = null, crossinline observeLoadingEffect: @Composable(viewModel: VM) -> Unit, crossinline provider: ReactiveViewModelContext.() -> VM): VM

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

The provider should instantiate the object directly.