Skip to content

Coding Best Practices

Koustov edited this page Jun 5, 2022 · 5 revisions

IN PROGRESS

Standard

  1. Every check-in must be validated against responsiveness
  2. No console error

Coding

General

  1. Avoid unnecessary comments
  2. Write DRY
  3. No sensitive information disclosure

New line practices

  1. A new line after every CSS block
  2. A new line after

Play Practices

  1. Play related CSS should not use any element selector

Javascript

  1. Use ES6 scripts
  2. Try avoiding console log
  3. Use linter

React Practices

  1. Try to use CSS per component-based
  2. Decompose into smaller components
  3. Use functional component
  4. Appropriate naming and destructuring Props
  5. Member name in camel case
  6. Constants in upper case
  7. CSS class name in hyphen-case
  8. Use propTypes as much as possible
  9. Avoid many props
  10. Use map rendering for an array
  11. Use ternary operator and &&