-
Capitalize class name. class MyClass {
}
-
Function/Method name, variable / local const
\\ Normal function function myFunction () { let myVar = 5; const myName = "Cong Nguyen"; }\\ Arrow function const myFunction = () => { let myVar = 5; const myName = "Cong Nguyen"; }\\ const MyClass = () => { renderHeader = () => { return ( <View> <Text>My Header</Text> </View> ) } } -
Global Constant definition:
\\ alway upper case const TIMEOUT_IN_SECONDS = 10; -
Always use ";"("dot comma") at the end of command.
-
Declare Global constant of the FILES (Class,Hook Function) at the first lines of file.
CONST MY_TEST_DATA = [ { id: 1, text: "This in the intro description.", imageId: "INTRO_1" }, { id: 2, text: "Press START to explore more.", imageId: "INTRO_2" } ]; ... function MyComponent ({ props1, props2 }) => { // ... } ...