Join Slack
Powered by
Is there a way to link a component (eg:Presenter i...
# koin
f
Fanilog
07/07/2021, 4:06 PM
Is there a way to link a component (eg:Presenter injected multiple times) to a viewmodel scope ? Edit: in a full compose app
👀 1
a
arnaud.giuliani
07/08/2021, 4:11 PM
You have the activityRetainedScope() based on a ViewModel -
https://insert-koin.io/docs/reference/koin-android/scope/#setup-the-scope
arnaud.giuliani
07/08/2021, 4:11 PM
else perhaps need more work around for now 🤔
f
Fanilog
07/08/2021, 4:19 PM
Yeah finally I'm listening to the lifecycle of the NavBackStackEntry to know when the Viewmodel is created or cleared
Fanilog
07/08/2021, 4:19 PM
It’s a bit tricky since I’m working on a Compose single activity app
a
arnaud.giuliani
07/09/2021, 10:15 AM
Yeah, Koin need to help more about such navigation & activity/viewmodel centric cases
2
Views
Open in Slack
Previous
Next