라이프 사이클의 이전 버전 :
React16 새로운 라이프 사이클 :
요약 :
1.React16 새로운 라이프 사이클이 componentWillMount, componentWillReceivePorps을 포기, componentWillUpdate
2. 추가 getDerivedStateFromProps는 getSnapshotBeforeUpdate 대신 (componentWillMount, componentWillReceivePorps, componentWillUpdate) 세 후크 함수 버려진
3.React16이 세 후크 기능을 삭제하지,하지만 두 후크 기능을 추가 할 수 없습니다 (getDerivedStateFromProps을 getSnapshotBeforeUpdate)를 섞는다. 참고 : React17는 componentWillMount, componentWillReceivePorps, componentWillUpdate 삭제됩니다
4. 라이트 에러 핸들링 함수 훅 (componentDidCatch)