component 라이프사이클 변경(v16.3이후)
getDerivedStateFromProps(<componentWillMount)
getDerivedStateFromProps(<ComponentWillRecieveProps)
getSnapshotBeforeUpdate(<ComponentWillUpdate:렌더직후로 변경)
1.initiallizition
constructor
2.Mounting
getDerivedStateFromProps> render> componentDidMount
3.Updation(props state변경)
-props
getDerivedStateFromProps>shouldComponentUpdate
>render>getSnapshotBeforeUpdate>componentDidUpdate
-state(
shouldComponentUpdate>render > getSnapshotBeforeUpdate(dom에적용 직전)>componentDidUpdate
componentDidUpdate
componentWillUnmount
'프론트엔드 공부 > react' 카테고리의 다른 글
npx create-react-app (0) | 2021.05.29 |
---|---|
componentDidCatch(error,info) (0) | 2021.05.29 |
react component lifycycle (16.3ver이전) (0) | 2021.05.29 |
이벤트적용(함수형,class) (0) | 2021.05.29 |
객체형state,constructor형 state/setState 두가지방법 (0) | 2021.05.29 |