https://kotlinlang.org logo
Title
d

Deklan Webster

04/13/2021, 6:43 PM
how would a mobile/desktop multiplatform app work with Kotlin + Jetpack Compose? Say, targeting iOS/Android/Windows/Mac? Business logic in Kotlin, Compose for everything except iOS, and then write the iOS view layer with Swift UI or whatever?
a

Arkadii Ivanov

04/13/2021, 6:45 PM
I think yes. You can check the TodoApp sample, it is designed exactly this way. https://github.com/JetBrains/compose-jb/tree/master/examples/todoapp
d

Deklan Webster

04/13/2021, 6:50 PM
wild. thanks
it's a bit strange how this allows for using Jetpack Compose for 3/4 of the targets, but you need something special for the last
🍏 4
a

Arkadii Ivanov

04/13/2021, 6:54 PM
Not exactly, there is also JS which is not yet supported by Compose, and all other Native targets. But this might be a benefit, because you use native UI. Everything else can be shared, from data layer to and including navigation.
d

Deklan Webster

04/13/2021, 6:55 PM
True, but I excluded JS from my list intentionally since it is itself an odd duck in a way. People use web apps from either mobile or desktop, so not having a web app in that case isn't particularly exclusionary
So, from the POV of targetting iOS/Android/OS X/Windows
3/4 in Jetpack Compose still a little strange
also, "yet supported by Compose" 🧐
web Compose is in the works?
a

Arkadii Ivanov

04/13/2021, 7:00 PM
There were open roles to work on Web Compose AFAIK, plus there were some related commits.
🧐 1
e

Eric Chee

04/13/2021, 7:08 PM
Yeah i believe a thread earlier in the year referenced them working on Compose for JS.
i think there was a way to play with it too but it was half baked
a

altavir

04/13/2021, 7:12 PM
Current web-compose uses DOM widgets, not Android widgets, so it is a little bit different (I would be happpy with DOM).
o

orangy

04/13/2021, 8:00 PM
#compose-web