Skip to content

Variable Naming

CategoryNaming StyleExample
Constants (primitives)SCREAMING_SNAKE_CASEMY_CONSTANT
TypesPascalCaseMyType
ComponentsPascalCaseMyComponent
Everything elsecamelCasemyVariable
Keys in json files (i18n)PascalCase (for objects) and camelCase (for values)Dashboard.Header.Navigation.userLabel

All boolean variables should be named with a “booleanish” prefix, like is, has, can, will, should, did, etc.

  • Correct: isLoading
  • Incorrect: loading