Hello, I have a question about @Preview annotation. Why we need to it for seeing preview version of the code? Should it be the default for our screen? In my opinion, We should see a preview of every composable function in setContent.
s
sindrenm
01/13/2020, 11:31 AM
One benefit of a separate preview function (annotated with
@Preview
) is passing in mock data. How else would you be able to preview components that display data that is not yet known at compile-time?
m
Manuel Wrage
01/13/2020, 11:31 AM
I guess this cannot work because you must feed dummy data into the composables and there's no way to automatically do this.