Closed oianmol closed 1 year ago
Hi! The only thing missing is the KMM-ViewModel constructor for MutableStateFlow
:
- val uiState = MutableStateFlow(LoginUIState())
+ val uiState = MutableStateFlow(viewModelScope, LoginUIState())
That should make sure to propagate state changes to iOS.
Ohhh! The MutableStateFlow that you have created ! com.rickclephas.kmm.viewmodel.MutableStateFlow
! Please rename it to something like RickMutableStateFlow 😛 I couldn't have guessed that 😆
Hi! Thanks for creating KMMViewModel! 🙇🏼
I have started using KMMViewModel like this, also I have setup the extension for
Kmm_viewmodel_coreKMMViewModel
like mentioned in the docs.on iOS I was able to initialise the VM in my View
The problem is that the
uiState
never updates even if the ViewModel emits new values to the state flow , am i doing something wrong here ?