Hey guys, what is the best way of passing context ...
# koin
k
Hey guys, what is the best way of passing context in
viewmodel
. When I am trying to pass
context
through constructions of
viewmodel
it complains about
This field leaks a context object
.
m
The best way is, not to pass context into viewmodel 🙂 Viewmodels shouldn’t be aware of the context
m
ViewModel should be context-free since you should unit test it
k
ok sure, thanks for lemme know