• constructor : 처음 생성될 때 호출
    • this.state와 this.props를 초기화
  • componentWillMount() : 컴포넌트가 화면에 렌더링되기 직전에 호출
  • componentWillReceiveProps() : 부모로부터 새로운 props를 받았을 때 호출, 이전 props와 비교해서 상태를 변경하는 용도
    • getDerivedStateFromProps로 대체
  • shouldComponentUpdate : props나 state가 변경되었을 때 리렌더링 될지 결정
  • componentWillUpdate : 컴포넌트가 업데이트되기 직전에 호출되는 메서드
  • render : 컴포넌트의 JSX를 렌더링
  • componentDidMount : 마운트된 후 한번 호출 → API호출이나 DOM조작과 같은 side effect 수행
  • componentWillUnmount : 컴포넌트가 DOM에서 제거되기 직전에 호출
  • componentDidCatch : 에러가 발생했을 때 호출