Open
Description
Hi, I was looking at your ViewModel by using the KoinComponent to inject the repository, so in iOS you will not have to pass any parameter to ViewModel for initialization.
I have another workaround for this which makes it possible to pass a repository as a parameter using the KoinPlatform :
So in iOS you can init ViewModel using the above helper function using KoinKt.getViewModel() :
https://github.com/alirezaeiii/TMDb-KMM/blob/main/iosApp/iosApp/ContentView.swift
Do you think which approach is preferable and why? Since you have extensive experience in KMM.
Metadata
Metadata
Assignees
Labels
No labels