You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compose extensions allow you to inject a ViewModel while specifying a scope, but the activity and fragments one do not. They should both support the same parameters, otherwise one has to duplicate the source code to call resolveViewModel with a custom scope for fragments / activities.
Is there any reason why the fragment / activity do not support the scope parameter but the @composable ones do?
The text was updated successfully, but these errors were encountered:
@arnaudgiuliani What if you want to use a named scope though? Using the activity scope then everything is bound to the activity implicitly but if I want to have more than one scope on the same activity or just use a named scope to pass to child fragments and handle its lifecycle differently?
The compose extensions allow you to inject a ViewModel while specifying a scope, but the activity and fragments one do not. They should both support the same parameters, otherwise one has to duplicate the source code to call
resolveViewModel
with a custom scope for fragments / activities.Is there any reason why the fragment / activity do not support the scope parameter but the @composable ones do?
The text was updated successfully, but these errors were encountered: