So with something like this: <Button variant=“...
# javascript
g
So with something like this: <Button variant=“contained” color=“primary”> Hello World </Button> What should I write to be able to use this via kotlin?
s
That is JSX right? JSX ultimately is transpiled down into javascript function calls. You can see me building a small sample react-native DSL around it here: https://github.com/ScottPierce/kotlin-react-native/blob/master/shared/src/main/kotlin/react/ReactDsl.kt
g
Interesting, thank you. I found https://github.com/cfnz/muirwik which uses a lot the @JsModule annotation and kotlin-styled as a base to define the styles & co, but I am quite lost on how to use that project
s
I haven't actively developed with kotlin-js in a while, as I've been waiting for certain features to make it better for sharing client side logic, but when I was messing around with it I found using the kotlin-js-dce plugin essential as it spits all the libraries and js files that you use into a single folder that can be used. Once you have all the js files in one place, you can use normal means of packaging js files
g
But I guess libraries that are kotlin-wrappers like here need to be packaged as kotlin libraries depending on kotlin-js, right?
I am so confused with kotlinjs, its really difficult for now to use it IMHO