<aside> 💡

화면이 렌더링이 되기 전,후로 특정 작업을 수행하기 위해 호출할 수 있는 함수들로써, 클래스형 컴포넌트에서 사용할 수 있다.

</aside>

컴포넌트가 첫 렌더링 될 때

  1. constructor
  2. getDerivedStateFromProps
  3. render
  4. componentDidMount
  5. componentDidUnMount

컴포넌트가 재 랜더링 될 때

  1. getDerivedStateFromProps
  2. shouldComponentUpdate
  3. render
  4. getSnapshotBeforeUpdate
  5. componenetDidUpdate
  6. componentDidUnMount