Arnaud Giuliani
1 min readMar 24, 2020

--

I would advise to use factory as much as you can. It’s the simplest approach. If you really need to hold instances and not have singletons, scope can be a good tool for that.

If you need to create components around Android Activity/Fragments, factory are enough. ViewModel is a special factory that is tied to Android lifecycle.

--

--

Arnaud Giuliani
Arnaud Giuliani

Written by Arnaud Giuliani

Lead of #Koin framework (insert-koin.io) - Co-founder of Kotzilla (kotzilla.io) - Google Dev Expert #Kotlin - #AndroidDev

No responses yet