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
arnaud.giuliani
09/16/2024, 1:44 PM
just replace with @Single and use @ComponentScan in your modules
c
Colton Idle
09/16/2024, 2:58 PM
hm. I'm already using the koin dsl to have
single {}
Do I need @Single or @ComponentScan in that case?
a
arnaud.giuliani
09/16/2024, 4:08 PM
no, then if it's already declared in dsl, you're all good
K 2
k
Karan Sharma
12/17/2024, 11:21 AM
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