Hello, if I’ve been building a Kotlin Multiplatfor...
# multiplatform
Hello, if I’ve been building a Kotlin Multiplatform Mobile library up until now, and I decide to start adding JS support, is it as simple as adding js() target in the Kotlin block of the build file? Or will there be complications since I started with the KMM template instead of the KMP template?
Should be as simple as adding js() target and implementing your actual declarations there
One issue I recall running into adding js to a project was I had made some threading assumptions in my design that didn't work in the single-threaded JS world
It wasn't a deal breaker, I just needed to step back and think about the API a bit
If you are using a database, this might be a problem as well in JS.
Also check if your MPP dependencies (if any) support js target. If they're from maven central you can use kamp.petuska.dev to check
❤️ 1
Excellent thanks! We’ve been carful to avoid any libraries that didn’t support JS, as we knew this would be a possibility. So far everything seems to be working correctly by simply adding the js target.
🎉 1
It's really nice to see that currently there are enough multiplatform libraries that scenarios like this actually happen in the real world, it's not just a sales pitch about it being easy