henrikhorbovyi
06/30/2020, 3:41 PM@Composable
inline fun <reified T> inject(): Lazy<T>{
val context = GlobalContext.get().koin
return remember(context) { context.inject() }
}
So, I'd call 😀
val repository: Repository by inject()
Instead of
val repository: Repository = inject()
Sean McQuillan [G]
06/30/2020, 6:45 PM/ ...
return remember {
val context = ...
context.inject()
}
henrikhorbovyi
06/30/2020, 6:53 PMobject
so I suppose it won't changearnaud.giuliani
07/01/2020, 7:03 AMkoin-androidx-compose
sub project then, gathering the needed extensionshenrikhorbovyi
07/01/2020, 10:46 AM