Davide Giuseppe Farella
04/15/2023, 5:46 PMViewModel like
class MyViewModel(
@InjectedParam id: Id,
private val something: Something
)
where Something also needs the id.
Is there an easy way to “propagate” the @InjectedParam to Something?arnaud.giuliani
04/18/2023, 8:04 AMarnaud.giuliani
04/18/2023, 8:05 AMviewModel {(id:String) -> MyViewModel(id, get {parametersOf(id)})arnaud.giuliani
04/18/2023, 8:05 AMDavide Giuseppe Farella
04/18/2023, 9:56 AMInjectedParam to dependencies?
I have mixed feelings about it, as you usually need the injected param in the ViewModel, but then you pass it to the use case as a function param.
In my case I have a ViewModel and a MoleculePresenter, so it could make sense to tie the whole class to a single id, but I recognize that's not a common scenario