Hi all we are initial discussions to migrate curre...
# multiplatform
n
Hi all we are initial discussions to migrate current Android Kotlin Jetpack Comopose code to Compose Multiplatform to run it on iOS too. Is it a good idea and feasible to have a single Activity with different Compose Screens?
s
@Nandu Compose has been designed around the single activity architecture so, using single activity with multiple composable screens is actually the best practice.
3
n
Thank you @Sushant Hande for clarifying, any idea do how to manage viewmodels associated with each compose screen, in multi activity world viewmodels used to be managed inside each activity is there similar approach with Single Activity with multiple Compose screens
s
In compose, it is recommended to define ViewModel for screen level composable. You can make the use of same viewmodel for child composables of that screen.