hi everyone, is there a most used shared viewmodel approach so far. Can you give me information
t
Tung97 Hl
05/27/2023, 11:16 AM
I have implemented MVVM in KMM. Using KMMViewmodel and NativeCoroutine libs is the best combination and powerful. Then you can use native UI with this shared viewmodel.
Tung97 Hl
05/27/2023, 11:23 AM
Yes. And native coroutine, too (same author). But in my experience, I suggest you stick with MVI architecture instead of MVVM in KMM world. That mean you should keep going with decompose and mvikotlin. My current project doesn’t big enough, so I just use mvikotlin and follow MVI architecture.
t
Tran An
05/27/2023, 11:33 AM
MVVM is something I preferred. Decompose way is not the best choice if we want to integrate it in the big legacy app, it changes the navigation logic.
t
Tung97 Hl
05/27/2023, 11:37 AM
I understand it. I have migrated from MVVM to MVI. Very painful.
t
Tran An
05/27/2023, 11:41 AM
Can you share reason for the migration from MVVM to MVI?
t
Tung97 Hl
05/27/2023, 11:47 AM
I want to save developer resources but keep the app’s native performance. I choose KMM. Then we want to support iOS in the future but still keep minimal resources ( economy reason, you know :) ). MVI shall be the best architecture for Compose Multiplatform by JetBrains.