Fazza Razaq Amiarso• 2,340
@fazzaamiarso
Posted
Hello Poldini!
In general, for naming you want the name to be clear and meaningful. Your naming should be understandable without extra mental mapping.
- for boolean , usually you want to prefix them with is, has, should, etc. EX :
isLoading
,hasAddress
,shouldFetch
. - you also want the naming easy to understand and meaningful. So, instead of
yymmdd
for date, you can make it clearer tocurrentDate
, - for word casing, the convention is to use camelCase or snake_case (usually for server side)
- for function, it is better to prefix them with verbs such as
append
,get
,fetch
. EX:fetchUser
,getResponse
.
Here is a resource if you want to dig deeper.
Hope it helps! Cheers!
1
Leopoldini• 180
@LShiznit
Posted
@fazzaamiarso This is great. Thank you
0