Reputation: 17724
I understand that Compose Multiplatform, when used for iOs, is not SwiftUI. But what about when using Compose Multiplatform in KMM, is Compose Multiplatform on Android the same as the original Jetpack Compose on Android?
Upvotes: 4
Views: 4661
Reputation: 3167
Answer is yes. JetBrain’s Compose Multiplatform based on Jetpack Compose, shares most of its API with Jetpack Compose and use Jetpack Compose elements for Android. So for Android development there is almost no difference between using Jetpack Compose and Compose Multiplatform. Please take a look at GitHub repo.
Upvotes: 6
Reputation: 72
Jetpack Compose is a modern Android UI toolkit developed by Google for building native user interfaces in a declarative way. It's primarily focused on Android app development and allows developers to create UIs using Kotlin programming language.
Compose Multiplatform, on the other hand, refers to the capability of using Jetpack Compose for UI development in multiplatform projects. Kotlin Multiplatform (KMP) is a technology that allows you to share code between multiple platforms, such as Android, iOS, and even web applications, using Kotlin. Compose Multiplatform extends Jetpack Compose to work in multiplatform projects, enabling you to create user interfaces that can be shared across different platforms.
With Compose Multiplatform, you can write UI code once in Kotlin using Jetpack Compose and use it across Android and other supported platforms, which can help in code sharing and consistency across different platforms.
Upvotes: 2