Join Slack
Powered by
Hello everyone! I'm wondering what is the best pra...
# koin
d
Denis K.
09/14/2024, 2:31 PM
Hello everyone! I'm wondering what is the best practice when it comes to
koinInject()
ion of my viewModels - in screen constructor or in screen class body?
m
Muaz KADAN
09/16/2024, 4:47 AM
Either way the ViewModel is only created once But for the sake of testability and readability I prefer injecting ViewModel as a parameter
👍 1
✅ 1
a
arnaud.giuliani
09/16/2024, 1:42 PM
clearly better to consider parameter values in Compose 👍
Open in Slack
Previous
Next