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

Simon Lin

01/02/2022, 2:31 PM
If I have a
Recipe
compose to show
Recipe
data. Is it good to use the same name on both compose fun and data class?
k

K Merle

01/02/2022, 5:49 PM
You can use
RecipeItem
for compose function.
p

Paul Woitaschek

01/02/2022, 6:34 PM
Or RecipeRow, RecipeCard, whatever applies
s

Simon Lin

01/03/2022, 5:08 AM
So it is not recommended to use same name?
k

K Merle

01/03/2022, 6:37 AM
I don't think it says anywhere to not use it, but looking at other people code you can see what's common convention. You can use it.
👍 1
2 Views