Good afternoon, guys! One more question: I'm tryin...
# multiplatform
p
Good afternoon, guys! One more question: I'm trying to create a simple app following an example of a sample project. Now, I need to pass viewModel as a parameter, but in the sample 'koin' is used, namely:
Copy code
import org.koin.compose.koinInject
import presentation.navigation.SplashNavigation
import presentation.ui.splash.view_model.LoginViewModel

@Composable
internal fun SplashNav(viewModel: LoginViewModel = koinInject(), navigateToMain: () -> Unit) {
koinInject() (https://github.com/razaghimahdi/Shopping-By-KMP/blob/fe055734130d24461c6340f104666[…]hared/src/commonMain/kotlin/presentation/ui/splash/SplashNav.kt) I've heard something about it, but haven't tried yet. So is there any easy way to avoid using koin and use something more simple and straightforward? I just fear of falling into dependency hell 😃 Any help appreciated.
f
p
Thanks. Is it easy to add dependencies for koin? How do I know how many its deps I need in my project?
f
Please read the documentation of koin. You can use koin annotation for faster declaration.
p
Yeah, and that's what I got after: https://kotlinlang.slack.com/archives/C3PQML5NU/p1726755633906229 I understand that it takes time to get it right, but still.
Just in case you would like to know what was next: https://kotlinlang.slack.com/archives/C013BA8EQSE/p1726758996426619