Hi <@UHAJKUSTU>, i am trying to integrate koin, wi...
# decompose
s
Hi @Arkadii Ivanov, i am trying to integrate koin, with decompose, its working fine for android, ios, and desktop. BUt in case of web i m getting some error:
Copy code
Uncaught TypeError: $this.homeComponentFactory_1.create_esiqto_k$ is not a function
    at child_2 (WebDesktopDefaultRootComponent.kt:234:38)
    at DefaultChildItemFactory.l [as childFactory_1] (Your-Flixer-shared.js:15326:14)
    at protoOf.invoke_9e5oyy_k$ (DefaultChildItemFactory.kt:32:13)
    at DefaultChildItemFactory.invoke$default [as invoke$default_bfpx9a_k$] (Decompose-decompose-js-ir.js:135:35)
    at protoOf.prepareNewItems_obvoel_k$ (Standard.kt:158:2001)
    at protoOf.switch_55pz6e_k$ (ChildrenNavigator.kt:117:24)
    at new ChildrenNavigator (ChildrenNavigator.kt:44:13)
    at children (ChildrenFactory.kt:80:13)
    at childStack_0 (ChildStackFactory.kt:91:5)
    at childStack (ChildStackFactory.kt:40:5)
I am initializing koin above main method in main.js.kt, ANd i am passing the factories of components in root component(WebDesktopDefaultRootComponent), but while during childFactory setup, it tries to create component, it shows this error. But similar way working fine in desktop. Becoz for web and desktop i have one common module webDesktopCommonMain, and same root component WebDesktopDefaultRootComponent, any idea? I am following the same pattern of using Factory which u followed in droidcon-decompose branch of droidcon kmp app. Any idea is this error related to which side, compose web, decompose or koin?
a
This looks like a bug in K/JS compiler, but I'm not sure. I'd recommend isolating and finding the offending code. Then try to change the code so it works, and file a bug on Youtrack.
s
ok