T
T
Tsuzukeru2021-03-14 12:29:14
Android
Tsuzukeru, 2021-03-14 12:29:14

What method do you use for DI in ViewModel?

I'm learning Dagger 2. I found out that there is a dependency injection problem in the ViewModel. How do you solve this problem? Are there new ways to solve it? Almost all articles for 17, 18 years.
I settled on this solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Zakharov, 2021-03-14
@blazenn12

You can use Hilt, but it's still in beta

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question