LifeCycle(생명주기) 메서드는 컴포넌트가 브라우저에서 나타나고, 업로드되고 사라지게 될 떄 호출되는 메서드이다.
useEffect
와 비슷하다.크게 3가지가 있다
메소드
constructor()
getDerivedStateFromProps()
render()
componentDidMount()
메소드
getDerivedStateFromProps()
shouldComponentUpdate()
render()
getSnapshotBeforeUpdate()
componentDidUpdate()
메소드
componentWillUnmount()