Post

#JetpackCompose 1.11 landed, adding support for Preview Wrappers. I'm not sure how useful this is right now, since they seem to require more code than using simple wrapper Composables in Previews. Those can also have parameters if you need flexibility. Did you try it out?

1 repost5 likes

Hmm - I like the idea, but there's a potential API ambiguity. If I define MyPreview1 and MyPreview2, both have different preview wrappers, which will get picked? If both have the same, will only that one get picked, or will both previewwrappers be called (nested)?

Multipreviews already don't stack. So for MyPreview1 the first wrapper would be use, for MyPreview2 the second wrapper. No?