Maybe I'm missing something basic here, but with c...
# compose
c
Maybe I'm missing something basic here, but with compose, I basically have it so that all of my screens have a viewmodel, and I have a baseviewmodel.
Copy code
abstract class BaseViewModel() : ViewModel()
this BaseViewModel has a field
Copy code
var userActionEvent: ((UserAction) -> Unit)? = null
I want to enforce that my composable always sets up the userActionEvent. How would I do this? I suppose I would typically just do this with a constructor arg for the VM, but I can't do that? (im using hilt).