Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 684 Bytes

checklist.md

File metadata and controls

32 lines (26 loc) · 684 Bytes
  1. [CODE STYLE] - Method's name should start with a verb (so you could easily tell what your method actually do)

BAD EXAMPLE:

clickHandler = () => {
 console.log('Hello, world');
}

GOOD EXAMPLE:

handleClick = () => {
 console.log('Hello, world');
}
  1. [CODE KNOWLEDGE] - Check if you remove your event listener, when component will unmount from page.

  2. [CODE STYLE] - Readabily is everything. Format ternary operator operands correctly - move each operand to the separate line:

BAD EXAMPLE:

 {condition ? 'Very important text': 'Nothing important'}

GOOD EXAMPLE:

 {condition 
   ? 'Very important text'
   : 'Nothing important'
 }