Presented at Droidcon NYC, 2022
https://www.droidcon.com/2022/09/29/integrating-kotlin-js-in-a-kotlin-multiplatform-library/
Javascript is one of the supported targets for a Kotlin Multiplatform project. One can add Kotlin/JS target to an existing Kotlin Multiplatform Mobile library to output a JS library code.
There are various aspects to consider for the Kotlin/JS integration,
• Supporting JavaScript or Typescript
• Gradle configuration
• Exposing Kotlin code to JavaScript and writing JS-specific code
• JS Library size and impact of third-party libraries
• Architectural decisions around shared code across platforms, networking, storage, serialization, etc.
This talk discusses how to deal with the issues mentioned above and more.