리액트 컴포넌트 라이프사이클

Jayden ·2023년 3월 15일
0

리액트에서 컴포넌트 라이프사이클은 Declarative라는 성질을 가지고 있다. 생성부터 소멸까지의 순간을 선언적으로 표현된 함수를 실행해서 사용할 수 있게 한다.

리액트 v16.3 이후에는 다음과 같은 라이클사이클 함수를 제공한다.

  • constructor
  • getDerivedStateFromProps
  • render

  • componentDidMount

  • getDerivedStateFromProps

  • shouldComponentUpdate

  • render

  • getSnapshotBeforeUpdate

  • componentDidUpdate

  • componentWillUnmount

profile
J-SONE 프론트엔드 개발자

0개의 댓글