https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

Ana Sekuloski

03/22/2024, 1:01 PM
Hey everyone. Did someone try the “2.8.0-alpha03” from androidx.lifecycle-viewmodel in KMP? Are there any advantages over existing libraries for sharing view models? I’d like to avoid using libraries and rely on this, but I’m not sure if it’s doable at the moment, since it’s in alpha.
👀 1
p

Pablichjenkov

03/22/2024, 3:13 PM
Still not usable outside Android. Part of the API is KMP ready but relies on other parts that are not. WRT other libraries, well, the choice is up to you. Advantages are that it is well maintained and battle tested by a lot of people. Third parties solutions are really good too.
👍 1
a

Ana Sekuloski

03/23/2024, 12:44 PM
Thank you for the answer. At the end I think using libraries will be the safest choice, or implementing the view model by ourself.
👍 1
p

Pablichjenkov

03/23/2024, 9:56 PM
Well, once it is out and if you like the Android jetpack architecture in general (I don't) then I would say it is better to use it. Because the reasons above, is maintained by Google and battle tested by a huge community.
4 Views