I have extensive experience in ES6/React for the browser and Java/Kotlin for Server-, Desktop- and Mobile-Apps.
A week ago I switched a fairly new project from the usual setup (react/babel/webpack) to Kotlin-code only. My IDE compiles the Kotlin to JS now and webpack serves it as usual.
Writing the react-bindings took me an hour, after that my productivity went up by about 10.000%. It's finally on par with my productivity on server and desktop. No type errors, fast refactoring, no "undefined" errors and all the goodies (extensions) of Kotlin.
Removing the complex eslint settings and babel-setup from webpack and package.json felt triumphant.
My JSX looks like this now and is completely typesafe:
val LieferungenList: (props: ListProps) -> ReactElement = {
Datagrid {
div {
className = "..."
...
}
TextField {
source = "date"
}
TextField {
source = "produktname"
}
EditButton {
}
}
}
I even get compiler-errors when I nest HTML-tags the wrong way (h1 inside h1) or so.I couldn't be happier. I'll never touch plain ES6 again.