ViewModelComponent

@Component
annotation class ViewModelComponent

Can be provided as com.hoc081098.kmp.viewmodel.ViewModels or types used by ViewModels when used with @Provides.

@Provides
@ViewModelComponent
class SampleViewModel(
userRepository: UserRepository
): ViewModel()

Can inject a com.hoc081098.kmp.viewmodel.SavedStateHandle using ViewModelComponent.

@Provides
@ViewModelComponent
class SavedStateViewModel(
private val savedStateHandle: SavedStateHandle
) : ViewModel()

Additional available types: