How bad of an idea is this? Performance aside ``` ...
# koin
n
How bad of an idea is this? Performance aside
Copy code
inline fun <T> withKoin(crossinline block: KoinComponent.() -> T): T {
	return object : KoinComponent { val v = block() }.v
}
b
or just
Copy code
inline fun <R> withKoin(crossinline block: KoinComponent.() -> R): R = (object : KoinComponent {}).run(block)
👍🏻 1