Does anyone have recommendations for sharing view model state through KMP? Also, how to handle app navigation? I see the Decompose and MVI-Kotlin libraries are quite mature, but they also seem pretty heavy / opinionated. Do you have to use them together, or can you mix and match? Are libraries even necessary?
a
Arkadii Ivanov
08/03/2023, 7:44 PM
Do you have to use them together, or can you mix and match?
Not necessarily. Every library covers different topic.
j
Jacob Rhoda
08/03/2023, 7:54 PM
What are the differences between a Decompose Component and a MVI-Kotlin ViewModel?
a
Arkadii Ivanov
08/03/2023, 8:11 PM
There is no such thing as MVIKotlin ViewModel. The library provides a single source of truth (Store) for an app/screen/sub-screen/whatever. With some cool debugging tools like logging or time traveling.
Decompose is for navigation and code decomposition.
j
Jacob Rhoda
08/03/2023, 8:11 PM
Sorry, that is what I meant.
a
Arkadii Ivanov
08/03/2023, 8:12 PM
Ah yes, Decompose also provides ViewModel-like behaviour (retained instances).