React class component 라이프사이클 함수 호출순서
1. 컴포넌트가 생성될 때 : 1️⃣ constructor 2️⃣ getDerivedStateFromProps 3️⃣ render 4️⃣ componentDidMount 2. 컴포넌트의 Props가 변경될 때: 1️⃣ getDerivedStateFromProps 2️⃣ shouldComponentUpdate 3️⃣ render 4️⃣ getSnapshotBeforeUpdate 5️⃣ componentDidUpdate 3. 컴포넌트의 State가 변경될 때: 1️⃣ shouldComponentUpdate 2️⃣ render 3️⃣ getSnapshotBeforeUpdate 4️⃣ componentDidUpdate 4. 컴포넌트의 렌더링 중 에러가 발생할 때: 1️⃣ componentDidCatch 5. 컴..
2023.08.13