Hi, everyone How do I inject something inside a `B...
# koin
o
Hi, everyone How do I inject something inside a
BroadcastReceiver
?
Copy code
inline fun <reified T> KoinComponent.inject(name: String = "") = lazy { StandAloneContext.koinContext.get<T>(name) }
?
I found it at https://github.com/InsertKoinIO/koin/issues/7#issuecomment-342953113 But I don't know if is the best way
(Since this is from almost a year ago)
a
still use the
KoinComponent
interface if you want to use inject()/get() from outside
👍 1
o
Thx, buddy