Hey everyone! What is the difference between <jetb...
# multiplatform
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