React

[React] 클래스 라이프사이클

J3SUNG 2020. 11. 9. 20:00
728x90

componentDidMount() 
=> 컴포넌트가 첫 렌더링된 후 실행

componentDidUpdate()
=> 리렌더링 시 실행

componentwillUnmount()
=> 컴포넌트가 제거되기 직전에 실행



클래스 라이프사이클

1. constructor
2. render
3. ref
4. componentDidMount
*. (state/ props 변경)
5. shouldComponentUpdate
6. render
7. componentDidUpdate
*. (component가 제거됬을 때)
8. componentWillUnmount

 

 

해당 게시글은 www.youtube.com/watch?v=V3QsSrldHqI&list=PLcqDmjxt30RtqbStQqk-eYMK8N-1SYIFn&index=1&ab_channel=ZeroChoTV 의 강의내용을 기반으로 공부한 내용을 정리한 글입니다.