-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Vo Thanh Luan edited this page Jul 17, 2022
·
1 revision
Welcome to the digirent-app wiki!
Note: Follow AirBnB coding styles and run npm run lint
to check for problems
- Always run
npm run prettier
before committing any code - Meaningful function name and variables
- Use camelCase for variable and function names
- Use camelCase of class members, interface members, methods and methods parameters
- Use PascalCase for class names and interface names
- Use PascalCase for enums and camelCase for enum members
- Do not use negative names for boolean variables
- Use 2 spaces. Not tabs
- Use semicolons
- Use functional components instead of class-based
- props must be read-only
- Higher-order components can be implemented with a render prop
- Prefer state initialization in class member variable declaration over constructor
- Avoid nested state
- Import the functions you need, not entire modules
- Use stateless components as much as possible
- Explicit is better than implicit
- Do not add unneeded context
- Write comments when explaining why something is being implemented in a particular way
More will be updated ...
Latest update: July 18, 2022