Compose Multiplatformvisit website
You can choose the platforms across which to share your UIs using Compose Multiplatform:
(as of 22/06/2023)
Why is this technology in trial?
Having experience with Jetpack Compose (for Android), it is a very small step to Compose Multiplatform. We noticed that with very minor changes we can make our existing Android-specific code run on other platforms, like iOS. Of course we already noticed that, especially on iOS, this is still in alpha, due to the lack of available libraries and the minor glitches that we see. Nevertheless this is a very interesting development that we want to keep our eye on
Jetpack Compose is a modern toolkit designed to simplify UI development. It combines a reactive programming model with the conciseness and ease of use of the Kotlin programming language. It is fully declarative, meaning you describe your UI by calling a series of functions that transform data into a UI hierarchy. When the underlying data changes, the framework automatically recalls these functions, updating the view hierarchy for you.
We already know from tools like Flutter and React that using the same language for multiple platforms is a big advantage. One of the disadvantages of these tools is that combining them with native code isn't that easy. Since Kotlin compiles/transpiles to actual native code, interop is as easy as mixing Kotlin with Java on Android.
Note that KMMP isn't a cross-platform framework which forms the base of your app. It's better to compare it with an additional library you add to your existing native app. The developer itself is in charge of how much code is shared between platforms, ranging from a single method to the whole app. Multiple official and community-backed libraries are available to ease development, from API calls to storage to UI development (like Jetpack Compose).