본문 바로가기

React

상태

728x90

1. mounting

- constructor(자바스크립트 class 생성 시 호출)

컴포넌트가 마운트될 때, 화면에 표시될 때, 컴포넌트가 나의 웹사이트에 갈 때 constructor호출

- render (setstate 실행시)

componentDIdMount으로 rendered 완료 확인

 

2. updating

- 사용자에 의해 업데이트

componentDIdUpdate으로 updated 완료 확인

 

3. unmounting

- 컴포넌트가 죽는 것

'React' 카테고리의 다른 글

router  (0) 2020.08.14
PropTypes / state  (0) 2020.08.13
쌩초보 React 시작 - jsx  (0) 2020.08.12