:alphabet-white-question: :compose-multiplatform: Are there any plans to make the Compose Preview UI...
d
alphabet white question K Are there any plans to make the Compose Preview UI tooling more multi-platform so we can define
@Preview
`@Composable`s from
commonMain
? Given that all platforms are rendered by the same underlying layout code, I would think a solution is possible? I'd honestly be happy with something like the current, basic, Desktop preview working for all platforms. For Android this would be a bit of a downgrade from the richer Android Studio tooling, but I value a consistent user experience more. This is probably the biggest workflow issue I have with multi-platform Compose projects today. Previews are one of Compose's biggest strengths but are currently so impractical to use across platforms, that I find myself not using the feature at all.
10
e
I ended by creating the UI files in the Android module first and moving them into the common module after they are mostly finished. Then I leave the preview function in the Android module to keep the ability to preview future changes.
s
this is a very clever trick, thank you for sharing.
👍 1