Good morning everybody. As far as I understand mul...
# multiplatform
p
Good morning everybody. As far as I understand multiplatform compose is pretty close to android jetpack compose. But are there any limits of their equlity? I mean how much are they the same in terms of facts and numbers?
e
It's the same exact common code, with different platform implementations for whatever can't be common.
c
iOS and web may have nuanced bugs in them, less of the actual compose views, but more around say, how iOS touches get interpolated into an Android equivalent to work with compose. And if compose isn't written at common code level by Google, there will be a delay to have to write/port that to common code
But for the most part there's been very few show stopping bugs, 1.7 was a little rough during the alphas but smoothed out allot for the beta+. Just be sure to test your non-android targets throughly if using early versions
p
Thank you guys. Does it mean, that any code written for Jetpack Compose can be easily reused for Kotlin Multiplatform without any (or with minimal) changes? And more specifically, that books written on Jetpack Compose with Kotlin can be 're-used' at learning Multiplatform too?
c
Pretty much, you just can't use anything that would be JVM specific when converting. So you would need to see how much knitting you did of Android/JVM Apis (as they don't exist at common level)
If you built your Compose views only using compose and kotlin api's. And your view models to only use kotlin. Should be prety easy. Most of your pain will be DB/Http/DateTime you'll need to convert to multiplatform equivilents
(Of which there are quite a few now)
As for books, maybe, really depends if they were written with just kotlin in mind, or Kotlin built on Java in mind