The most important question right now is how to do dependency injection in viewModel , like you normally have repoisitory dependency in viewModel, how to handle di here, please give me some idea
well, you use Hilt, you specify a RepositoryModule for Hilt in which you provide the repository you want, and then in the viewmodel you say class MyViewModel @Inject constructor(val myRepository: Repository): ViewModel(), done
I made an app with Compose MP and koin, precompose, datastore ect its just like building an android app basically, precompose is very very similar to compose navigation and di with koin is exactly the same
The most important question right now is how to do dependency injection in viewModel , like you normally have repoisitory dependency in viewModel, how to handle di here, please give me some idea
well, you use Hilt, you specify a RepositoryModule for Hilt in which you provide the repository you want, and then in the viewmodel you say class MyViewModel @Inject constructor(val myRepository: Repository): ViewModel(), done
I made an app with Compose MP and koin, precompose, datastore ect its just like building an android app basically, precompose is very very similar to compose navigation and di with koin is exactly the same