I figured out I don't really need my viewmodels to be lifecycle aware and I want to replace them with just plane kotlin classes to handle the ui logic, my problem is hilt; since it will only allow me to inject fields into android components like activities or services. Now, I don't want to inject my plane class viewmodels into the activity as this will make them servive when my composables leave the composition. Is there any work around to achieve that using hilt? Should I just implement my own dependency injection? I heard of another di library called koin, could it help?
One thing I thought about is injecting the repository in the main activity then pass it to the composables so the can use it to create their instances of the viewmodel but this seems like it's gonna break the separation of concerns rule.