React Life Cycle

constructors

Do
  • create any fields (variables starting with this.)
  • initialize state based on props received
  • set initial state
  • if not using class properties syntax — prepare all class fields and bind functions that will be passed as callbacks
Don’t
  • cause any side effects (AJAX calls etc.)