eekboom
04/23/2023, 4:04 PM@Component
on a class and be done. When I need an instance in another component, then I just declare a constructor with a parameter of that type.
On second look I found koin annotations.
However,
• the docs put still the DSL first and annotations are even explained in terms of the DSL configuration.
Why is that? Can't we emphasize annotations more? Or are there distinct advantages of using the DSL?
• even in the annotations tutorial we still need by inject()
- can we get rid of that? Maybe make the UserApplication
a koin component, too and tag it with createdAtStart=true
?
When browsing the internets koin often gets a bad rep because you (supposedly) must use KoinComponent
, by inject<>()
, get()
, ...