https://kotlinlang.org logo
#compose
Title
# compose
p

pavi2410

10/23/2019, 7:33 PM
Copy code
@Preview
@Composable
fun Greeting(name: String = "Android") {
    Text (text = "Hello $name!")
}
Would the preview work by using default values?
t

themishkun

10/23/2019, 7:36 PM
I think the sole purpose of
@Preview
is to make a documentation for your components. So you can develop them and provide some usage examples for different states
r

romainguy

10/23/2019, 7:48 PM
No, it actually renders previews in the IDE
3 Views