I'm a bit confused on the coding conventions. I'm running through codelabs for compose and coding for compose desktop. All of the function names are PascalCase. Should I follow the convention as shown or ignore this and stick to camelCase?
c
Colton Idle
02/25/2021, 7:38 PM
I think it's convention that a composable function is in PascalCase.
✅ 4
b
Bryan L
02/25/2021, 7:42 PM
Ah, that makes sense now. Thank you!
j
jim
02/25/2021, 7:44 PM
To be clear, it's all composable functions with a Unit return type. Such composables should be nouns (not verbs) and use PascalCase.
🙌 3
z
Zach Klippenstein (he/him) [MOD]
02/25/2021, 8:13 PM
There should be Android Studio lint checks that tell you to name your Unit-returning composables in pascal case, and your non-unit-returning composables in camel case
➕ 2
r
rcd27
03/01/2021, 12:13 PM
Not only for AndroidStudio, but for IntelliJ as well (writing desktop app and getting confused by underlines)