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