Colton Idle
04/17/2024, 5:23 PMMarcello Galhardo
04/17/2024, 7:16 PMStylianos Gakis
04/18/2024, 10:38 PMMarcello Galhardo
04/19/2024, 6:00 PMWhat does koin do to know how to scope the VM to the right place? Is it by looking up the composition local for the ViewModelStoreOwner?
Koin can either provide their own
koinViewModelhiltViewModelViewModelStoreOwnerKoinViewModelProviderFactoryFactoryviewModelIf so, doesn't the multiplatform navigation artifact provide the right local for this on each destination?
Yes, Navigation KMP provides a NavBackStackEntry that is your local ViewModelStoreOwner.
What will koin need to do especially to support this here which isn't already done?
Koin will need to (1) depend upon the JetBrains Multiplatform artifact, (2) migrate their
koinViewModelFactoryStylianos Gakis
04/19/2024, 6:04 PMColton Idle
04/24/2024, 2:54 AMarnaud.giuliani
04/24/2024, 9:50 AMKoin can either provide their ownYeah this is already the Koin approach to provide a parallel API to Hilt ones, trying to wire on same and, orthogonal tokoinViewModel, which fetches the localhiltViewModeland use theViewModelStoreOwneror they can expose theirKoinViewModelProviderFactoryand clients can pass it to the defaultFactoryfunction.viewModel
KoinNavViewModelarnaud.giuliani
04/24/2024, 11:23 AMKoin will need to (1) depend upon the JetBrains Multiplatform artifact, (2) migrate theirfunction andkoinViewModelto common, (3) migrate their Binding and Constructor DSL to provide the ViewModel support in common instead of Android.Factory
Theoretically, that should be enough.clearly yes 🙂
Colton Idle
04/27/2024, 4:30 PMarnaud.giuliani
04/29/2024, 8:48 AM