Hi. I am trying to use DI with compose for web. I ...
# kodein
f
Hi. I am trying to use DI with compose for web. I have
kodein-di-framework-compose
library and when I try to attach the di to composable i am getting `content is not a function`error for some reason. The code is just simple composable.
Copy code
@Composable
fun App() = withDI({
}) {
    Text("Hello world")
}
I have these dependencies
Copy code
implementation("org.kodein.di:kodein-di:7.12.0")
implementation("org.kodein.di:kodein-di-framework-compose:7.12.0")
The error looks like this
Copy code
Uncaught TypeError: content is not a function
    at CompositionLocalProvider$composable (CompositionLocal.kt?857d:228:5)
    at withDI$composable (withDI.kt?309d:15:5)
    at App$composable (Main.kt?7792:19:13)
    at eval (Main.kt?7792:26:9)
    at ComposableLambdaImpl.invoke_5qf8pc_k$ (ComposableLambda.js.kt?a45e:116:22)
    at eval (KotlinRegulator.js:1163:25)
    at eval (renderComposable.kt?e3c2:61:9)
    at ComposableLambdaImpl.invoke_6harzl_k$ (ComposableLambda.js.kt?a45e:107:22)
    at eval (web-internal-web-core-runtime.js:446:25)
    at invokeComposable$composable (Composer.js.kt?6ed4:20:16)
I guess i am using something wrong, but i just cant figure out what it is
I updated to 7.14.0 and the problem fixed itself so i guess it was just version mismatch