Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 819 Bytes

File metadata and controls

12 lines (10 loc) · 819 Bytes

React

Basic React

  • Passing a key to an array (different than an index or a random thing) it’s really important cause it helps React keep track of what element of the array it snapped to what element in the DOM
  • Use colocation to improve app performance (put the state as down in the tree as possible) source.
  • Try to maintain a habit of recollecting state to improve performance.
  • It's better to use a status enum (or better a state machine) instead of booleans. source.