Could someone help me about doing this in kotlin? ...
# javascript
a
Could someone help me about doing this in kotlin? https://reactjs.org/docs/code-splitting.html
j
which part of that?
a
import("./math").then(math => { console.log(math.add(16, 26)); }); this part
j
you can define the type of import as a global external function right?
similar to how require is defined I guess
a
Could you give an example?
j
unfortunately it kind of depends on how you're building your project. I'm trying to get it working with CRKA but the way the webpack compiler works makes it very difficult
almost got it working, but very very hacky
a
so yes there are some problems about compatibility with JSX and Kotlin
i found a library for React but i don't know how to use it in Kotlin and there are a lot of library for React but hard to use or you can't use in Kotlin... Maybe kotlin-wrapper for them all could be good but the problem is documentation of kotlin is not well documented