Hey everyone! What is the difference between <jetbrains common viewmodel> and the android viewmodel?...
r
Hey everyone! What is the difference between jetbrains common viewmodel and the android viewmodel? Since the android viewmodel is also multiplatform compatible what is the benefit of this common viewmodel?
p
Is the same class AFAIK, both links refer to the same thing. Basically the old android-only code moved to multiplatform now and got named Jetbrains ViewModel somehow
👍 1
s
I wish they didn't call it ViewModel for KMP. KMP should be more platform agnostic.... The way that the Android ViewModel function is... well... very Android-y, even the KMP version of it.
It's a lifecycle aware (Ui)StateHolder... not sure what other name would fit better, though 🙂
2
r
yeah agree.. its primary responsibility would be ui state management
p
LifecycleAwareStateHolder
👌😁
👍 2
s
Or ScopedStateHolder 🙂
1
p
Naming is always hard
a
Also changing name will break the compatibility and make it harder to migrate existing code
1