vector / com.haroldadmin.vector / VectorViewModel / <init>
<init>¶
VectorViewModel(initialState:
S
, stateStoreContext:
CoroutineContext
= Dispatchers.Default + Job())
The Base ViewModel class your ViewModel should inherit from
Parameters¶
S
- The state class for this ViewModel implementing VectorState
initialState
- The initial state for this ViewModel
stateStoreContext
-
The CoroutineContext to be used with the state store
A VectorViewModel can implement the VectorViewModelFactory in its Companion object to provide ways to create the initial state, as well as the ViewModel itself.