클래스의 경우
(client.js로 부터 렌더링 되는 순간) <ReactDom.render>
==> constructor ==> render ==> ref ==> componentDidMount (컴포넌트가 첫 렌더링 된 경우)
==> (setState/props 바뀔 때) ==> shouldComponentUpdate(true)
(if return ture, 렌더링을 시킴. false면 일어나지 않음.)
==> (re)render ==> componentDidUpdate (리렌더링 후)
==> 부모가 나를 없앴을 때 ==> componentWillUnmount(컴포넌트 제거되기 직전)
==> 소멸
'TIL > REACT' 카테고리의 다른 글
메서드 안에 있는 함수 호출, 함수 최적화 하기. (0) | 2019.10.12 |
---|---|
componentDidMount() , componentDidUpdate(), componentWillUpdate() (0) | 2019.10.11 |
props 는 부모가 설정. (props 추가설명) (0) | 2019.10.11 |
this.setState => render() 실행! (0) | 2019.10.11 |
PureComponent & props 사용 방법 (0) | 2019.10.11 |
comment