Join Slack
Powered by
how does one pass viewmodels w/ DI to nested scree...
# compose
u
0xf1f1
02/26/2024, 7:34 PM
how does one pass viewmodels w/ DI to nested screens ?
h
Harold Martin
02/26/2024, 7:40 PM
You could but this is bad practice! Prefer instead to pass in the details needed by the children from the composable that has the VM
👆 1
u
0xf1f1
02/26/2024, 9:44 PM
but what if the children use a different viewmodel ? i am using nabgraph if that helps
s
Stylianos Gakis
02/26/2024, 9:58 PM
https://kotlinlang.slack.com/archives/CJLTWPH7S/p1708912712902289?thread_ts=1708819798.448369&cid=CJLTWPH7S
Stylianos Gakis
02/26/2024, 9:58 PM
Koin has integration with androidx.navigation too if you prefer that
3
Views
Open in Slack
Previous
Next