view Model
inline fun <T : ComponentActivity, VM : MavericksViewModel<S>, S : MavericksState> T.viewModel(viewModelClass: KClass<VM> = VM::class, crossinline keyFactory: () -> String = { viewModelClass.java.name }): Lazy<VM>
Content copied to clipboard
Gets or creates a ViewModel scoped to the current activity. This is similar to fragmentViewModel and actvityViewModel but used when a view model is accessed directly from an activity itself.