StoreViewModel
open class StoreViewModel<S : MVIState, I : MVIIntent, A : MVIAction>(store: Store<S, I, A>, start: Boolean = true) : ViewModel, Store<S, I, A> , Container<S, I, A>
An extendable class for creating a ViewModel that directly uses a delegate to act as a Store. There are 2 possible ways to use this class:
Create StoreViewModels and inject your desired Store as a constructor parameter, then use a qualified name or other type of dependency injection to resolve the needed ViewModel.
Subclass StoreViewModel for each ViewModel that is being used, build the Store using constructor params, with assistance from DI, and then inject that ViewModel by its direct type.
Most DI frameworks struggle with type erasure when it comes to injecting generic classes, so one of 2 ways outlined above can be used to resolve the conflicts.