Dan Rusu
01/28/2023, 8:22 PMstartKoin
but libraries don't typically have a main entry point so I'm wondering how to approach DI when creating librariesBig Chungus
01/28/2023, 8:57 PMDan Rusu
01/28/2023, 9:16 PMBig Chungus
01/28/2023, 9:56 PMDan Rusu
01/28/2023, 9:57 PMarnaud.giuliani
01/30/2023, 9:05 AMarnaud.giuliani
01/30/2023, 9:05 AMBig Chungus
01/30/2023, 9:14 AMDan Rusu
01/31/2023, 5:03 PMarnaud.giuliani
02/01/2023, 8:56 AMThe CustomKoinComponent is an abstract class which prevents using DI in subclasses. Is there a reason why that can’t be an interface instead?You are already depend on
KoinComponent
interface. Here you provide your framework implementation with an abstract class. You need to keep a Koin
instance under the handarnaud.giuliani
02/01/2023, 8:57 AMCan I initialize it directly in MyKoinContext singleton (and re-assign that variable from tests)?Yes, up to you to keep this Koin instance where you need and can get access easily. With that you can configure it for tests 👍