Is there a notion a `Reusable` the same way Dagger...
# koin
s
Is there a notion a
Reusable
the same way Dagger has ? I can’t find it, would anyone be interested ? many times I don’t really need singletons but I don’t need to create a new instance either
z
use
factory
instead of
single
ah, forget that, I misread
a
Scope API perhaps is an answer?
s
singleton
is the same as a
scope
at the application level
when creating classes that just hold pure functions we can use
factory
or
single
as we don’t really care if the object is shared. We then tend to go for single as it avoids creating another object. However marking it
single
seems wrong as we don’t need it to be single.
a
yeah, I’m creating
usecase
classes in my apps, with
factory
s
same with util classes ?
a
depends 🙂
Services are
single
like my repositories
depends if its a functional class or not …
and somtimes I keeo it static