Creation / Mounting / Updating / Destruction의 단계를 거침
export default {
name: 'life',
// ============== Creation ==============
beforeCreate(){
console.log("Start beforeCreate")
},
created(){
console.log("Start create")
},
// ============== Mounting ==============
beforeMount(){
console.log("Start beforeMount")
},
mounted(){
console.log("Start mounted")
},
// ============== Updating ==============
beforeUpdate(){
console.log("Start beforeUpdated")
},
updated(){
console.log("Start updated")
},
// ============== Destrucion ==============
beforeDestroy(){
console.log("Start beforeDestroy")
},
destroyed(){
console.log("Start destroyed")
}
}
컴포넌트들을 초기화하는 단계이며 라이프 사이클 중 가장 처음 실행됨
초기 렌더링 직전에 컴포넌트에 직접 접근이 가능함
컴포넌트에서 사용되는 반응형 속성들이 변경되거나 재렌더링 발생 시 실행됨.
해체 단계에 돌입함.