Explain _ and UPPER_CASE naming

This commit is contained in:
Lyubo Marinov 2017-04-06 11:45:13 -05:00
parent 54bb5f1879
commit 3af6cc53d1
1 changed files with 9 additions and 0 deletions

View File

@ -82,3 +82,12 @@
imports in other files should use the same name. Don't define the class imports in other files should use the same name. Don't define the class
`Registry` in ReducerRegistry.js and then import it as `Reducers` in other `Registry` in ReducerRegistry.js and then import it as `Reducers` in other
files. files.
* The names of global constants (including ES6 module-global constants) should
be written in uppercase with underscores to separate words. For example,
`BACKGROUND_COLOR`.
* The underscore character at the beginning of a name signals that the
respective variable, function, property is non-public i.e. private, protected,
or internal. In contrast, the lack of an underscore at the beginning of a name
signals public API.