I’m playing around with Compose Multiplatform, tar...
# multiplatform
j
I’m playing around with Compose Multiplatform, targeting Android, iOS, and Desktop. And I’m wondering how you would go about previewing your composables. So far all the composables are inside of
shared/commonMain
, but you can’t just put a
@Preview
down and have it work. All I’ve been able to come up with so far is to create a dummy file in
androidApp/
that sets up a Preview for the Composable I’m currently working on. It’s not an amazing experience, so I was wondering if there was a different approach here.
j
There's a Compose Multiplatform IDE plugin with
@Preview
support.
j
Doesn't that just add support for the Desktop sourceset? Or at least I couldn't get it to work for the
commonMain
sourceset
j
Yes, it requires the
compose.desktop.currentOs
dependency, not just
compose.desktop.common
.
s
@Preview is currently supporting for android and desktop with the plugin there is none for ios and shared as far as i know