React Reconciliation
2021. 7. 30. 00:29ㆍReact
1. 서로 다른 타입의 두 엘리먼트는 서로 다른 트리를 생성
2. 같은 타입의 두 엘리먼트는 attribute을 업데이트 시킴
3. 같은 타입의 두 컴포넌트는 mount, unmount를 하지 않고 컴포넌트를 업데이트 시킴
getDerivedStateFromProps로 확인 가능.
Class Component는 shouldComponentUpdate를 통해 두 Props를 비교
Function Component는 React.memo를 이용
'React' 카테고리의 다른 글
React Reducer (0) | 2021.07.31 |
---|---|
Redux Action (0) | 2021.07.31 |
react-router-dom Redirect (0) | 2021.07.27 |
react-router-dom에서 페이지 이동시 Link component 사용 (0) | 2021.07.27 |
react-router-dom Switch component, NotFound (0) | 2021.07.27 |