Whoa wait a minute... do you not need to make a se...
# compose
v
Whoa wait a minute... do you not need to make a separate function to preview a composable? Current instruction day to make a composable then another composable annotated with preview. Can you just add preview to a composable?
a
A Preview is just another composable so you can probably annotate your “regular” one, but you will be limited in how you set the parameters to that composable.
c
Yes, you can annotate any Composable with Preview. Very useful when starting out with small projects and learning Compose.
But over time, we recommend you use it not on the implementations of your Composables but as separate functions that are like small UI tests
Also, you can have multiple Preview annotations on a single Composable function to generate more than one Preview
💯 1
☝️ 1