I'm in the middle of a migration from hilt to koin...
# koin
c
I'm in the middle of a migration from hilt to koin. I have a few references of
@Singleton
on my classes. Those can be safely removed when using koin right?
👍 1
a
just replace with @Single and use @ComponentScan in your modules
c
hm. I'm already using the koin dsl to have
single {}
Do I need @Single or @ComponentScan in that case?
a
no, then if it's already declared in dsl, you're all good
K 2
k
I think the Single in dsl does not create a Singleton object. If a configuration change happens (rotate / switch theme) then a new object is created. See : https://github.com/InsertKoinIO/koin/issues/2078