Hello. I was wondering what would be the benefits ...
# javascript
g
Hello. I was wondering what would be the benefits of building a web app with Kotlin Multiplatform, instead of mixing JS and Kotlin separately. I want to get an idea of in which situations would using Kotlin Multiplatform be more beneficial than mixing those two.
r
I think it is the same with kotlin native: You have one codebase so theoretically just one place to add new features and fix bugs, but the downside is that you may get platform specific bugs and that debugging can get very messy
3
g
I like having 2 distinct IDEs for Js/Ts and KMP just because of the context switching : in KMP I've to take some stuff in consideration like multithreading and constraints due to the other platforms ; and indeed in Js/Ts I may have other things to consider, other priorities, another code style, a lighter IDE for performance, .... (Mostly a brain hack I wanted to share, it doesn't mean you've to do 2 repos or 2 directories, that's choice is really depending of your project/team I think.)
r
The biggest benefit is that you don't have to use JS 😉
6
😁 2
x
I would suggest against that. Use the right tool for the right platform. Personally I always pick typescript over kotlin when writing web, and I always pick kotlin over typescript when I write the backend, android, and desktop app.