I started KotlinJS in 2021 taking over a project that still used kotlin-frontend-plugin 0.0.45.
I updated as far as I could without major breaking changes but to this day it's stuck with muirwik and kotlin-warpper pre.204. Shortly after completing all immediate feature tasks I started building the product from scratch because you know how it is the demands changed and the growing number of supported devices revealed some flaws in the fundamental structure of the old project.
I also wanted to consolidate the code base a little with other projects inside our company that all use the same neat API framework that a coworker wrote and that I also in part maintain.
Now with that out of the way about my experience with KotlinJS, I am more of a 'see code, do code' learner.
I do read documentation, mostly to understand how specific parts work, but when coming into something new I look at existing working code and examples to get a feel for how this tool is meant to be used.
In many cases, not just KotlinJS, it's sometimes unclear 'where does this come from?' or 'how do I get that object where I need it?' And code examples can really help with that. kotlin-wrappers for example could really use more examples (maybe they are planned for when come out of 'pre' and are considered stable?), the mui showcase is nice, but like the name says it's a showcase on mui components, the examples help, but often do too many things at once so it's hard to follow especially when you are not yet fully hardened in KotlinJS/React.
I wish there were examples that teach one aspect of KotlinJS at a time, with primitives if possible. One problem I see is that some pain points also come from react. So it's kind of unclear where to look for an answer. Sometimes you look for your problem in the react world and find a solution, but it's really hard to translate that into your KotlinJS project, because you might be missing something else to really understand it.
I know it's not your task to teach people about js and react, but I wish there were tutorials/examples that reach a little further into js and react than just the bare minimum.
Some pain points I remember:
- Concept of
Props
who creates them and where do they come from.
- Wrapping js libraries and what js syntax correlates to which KotlinJS syntax.
- Sometimes types with the same name from different packages.
- Interaction between Routing, Loader, FC, Provider, Reducer and Context
(This is of course mostly react, but it's sometimes hard to translate react examples into KotlinJS when you are new)
- It was really often the case that projects created with IntelliJ IDEA just didn't work out of the box.
As someone coming in it's hard to create the whole project structure for KotlinJS (and maybe Multiplatform) from scratch. Last time I checked I couldn't even create a start project for 'normal js' I only had the option to create a WASM project. The project and gradle structure in general cost me some time.
It's hard for me to pinpoint examples, but often I was stuck because I needed knowledge from js and react, that I didn't have to continue. I know of course that this is also a me problem, but I think it would be nice to have KotlinJS provide some more 'starter guidance'.
Looking at those problems they are all very react heavy I guess, so I don't know if they even fit your question. But I hope the view point helps. Finally, while I like to think that what I write is at least OK code and it all seems to work out pretty well, I must also admit that I am a run of the mill programmer and I sometimes marvel at the deep insight that some people in this slack channel like CLOVIS have.