Harshith Shetty
Aug 29, 2022

Hey Shubham, We are not currently using Js target in KMP.

But looking at the issue you have shared, usually, when considering KMP, I usually assume the target platforms may not have support for Kotlin features like coroutines, suspending functions, etc, so the aim is to export as simple stuff as possible or provide supported alternatives for each platform.

For ex: We do all logic and threading implemented in common Kotlin code and only expose ViewModels, data classes, and Flows from common code. in-case of iOS as Flows can’t be consumed, we provide a helper extension to convert Flow to Callbacks from common code. But we don't let targets handle threading and other logic to make it simpler for targets to consume them easily.
Hope this helps.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Harshith Shetty
Harshith Shetty

Written by Harshith Shetty

Mobile App Architect @Shaadi.com

No responses yet

Write a response