Ahmad Hassan
03/28/2023, 11:40 AMalex009
03/28/2023, 11:56 AMremember
.
like:
val vm = remember { MyViewModel() }
but on android after activity recreation you got new viewmodel instance in this case.
also onCleared
will be not called automatically.remember
. when we found solution - we put it in moko-mvvm
new release and also add into https://github.com/icerockdev/moko-compose-multiplatform-templateAhmad Hassan
03/28/2023, 12:31 PMalex009
03/28/2023, 12:32 PMAhmad Hassan
03/28/2023, 12:34 PMalex009
03/28/2023, 12:37 PMgetViewModel
for compose multiplatform.
while release not published you can use it in own project just by copy-paste š
and can give feedback about usability š
https://github.com/icerockdev/moko-mvvm/tree/%23232-compose-multiplatform/mvvm-compose